<commit_before>module.exports = function(grunt) {
    grunt.loadNpmTasks('grunt-webfont');
    
    grunt.initConfig({

        pkg: grunt.file.readJSON('package.json'),

        env : {
            options : {
            //Shared Options Hash
            },
            test : {
                NODE_ENV : 'test'
            }
        },

        concat: {
			allJS: {
				options : {
					sourceMap: true
				},

				src: [
					'frontend/model/js/threed/viewerutil.js',
					'frontend/model/js/threed/*.js',
					'frontend/**/*.js'
				],

				dest: 'public/dist/three_d_repo.js'
			},

			allCSS: {
				src: [
					'frontend/**/*.css'
				],

				dest: 'public/dist/three_d_repo.css'
			}
        },

        uglify: {
            options: {
				sourceMap : true,
				mangle: false
            },

			allJS: {
				files: {
					'public/dist/three_d_repo.min.js': ['public/dist/three_d_repo.js']
				}
			}
		},

        jshint: {
            files: ['js/core/**/*.js', 'public/plugins/**/*.js', 'services/*.js', 'public/js/*.js'],
            options: {
                bitwise: false,
                curly: true,
                eqeqeq: true,
                forin: true,
                freeze: true,
                futurehostile: true,
                strict: true,
                unused: true,
                varstmt: false,
                strict: false,
                esnext: true,
                expr: true,
                newcap: false,
                // options here to override JSHint defaults
                globals: {
                    console: true,
                    module: true,
                    document: true
                }
            },

            backend:{
                files: { src: [
                    'backend/db/**/*.js',
                    'backend/services/**/*.js',
                    'backend/routes/**/*.js',
                    'backend/libs/**/*.js',
                    'backend/models/**/*.js',
                    'backend/*.js'
                ]},
            }

        },

        mochaTest: {
          unit: {
            options: {
              reporter: 'spec',
              quiet: false, // Optionally suppress output to standard out (defaults to false)
              clearRequireCache: false // Optionally clear the require cache before running tests (defaults to false)
            },
            src: ['backend/test/unit/**/*.js']
          },

          integrated: {
            options: {
              reporter: 'spec',
              timeout: 10000,
              quiet: false, // Optionally suppress output to standard out (defaults to false)
              clearRequireCache: false // Optionally clear the require cache before running tests (defaults to false)
            },
            src: ['backend/test/integrated/**/*.js']
          }
        },

		webfont: {
			icons: {
				src: 'icons/*.svg',
				dest: 'public/css/fonts',
				destCss: 'public/css/external',
                options: {
				    font: 'three-d-repo',
				    fontFilename: 'three-d-repo',
				    htmlDemo: false
			    }
			}
		},

		cssmin: {
			options: {
				shorthandCompacting: false,
				roundingPrecision: -1
			},
			allCSS: {
				files: {
					'public/dist/three_d_repo.min.css': ['public/dist/three_d_repo.css']
				}
			}
		},

        watch: {
            // Running watch may throw an ENOSPC error see:
            // http://stackoverflow.com/questions/22475849/node-js-error-enospc
            // Fix:
            // echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
            files: ['frontend/**/**'],
            tasks: ['frontend'],
            options: {
                livereload: true
            }

        },

    });


    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-mocha-test');
    grunt.loadNpmTasks('grunt-webfont');
    grunt.loadNpmTasks('grunt-contrib-cssmin');
    grunt.loadNpmTasks('grunt-env');
    grunt.loadNpmTasks('grunt-contrib-watch');

    grunt.registerTask('default', ['concat', 'uglify', 'webfont', 'concat:allJS','concat:allCSS', 'uglify:allJS', 'cssmin:allCSS']);
    grunt.registerTask('test', ['jshint:backend', 'mochaTest:unit']);
    grunt.registerTask('test-integrated', ['env:test', 'mochaTest:integrated']);
    grunt.registerTask('frontend', ['concat:allJS','concat:allCSS', 'uglify:allJS', 'cssmin:allCSS']);

    grunt.event.on('watch', function(action, filepath, target) {
        grunt.log.writeln('Watch: ' + filepath + ' has ' + action);<commit_msg>Lets make our livereloading nicer :)<commit_after>module.exports = function(grunt) {
    grunt.loadNpmTasks('grunt-webfont');
    
    grunt.initConfig({

        pkg: grunt.file.readJSON('package.json'),

        env : {
            options : {
            //Shared Options Hash
            },
            test : {
                NODE_ENV : 'test'
            }
        },

        concat: {
			allJS: {
				options : {
					sourceMap: true
				},

				src: [
					'frontend/model/js/threed/viewerutil.js',
					'frontend/model/js/threed/*.js',
					'frontend/**/*.js'
				],

				dest: 'public/dist/three_d_repo.js'
			},

			allCSS: {
				src: [
					'frontend/**/*.css'
				],

				dest: 'public/dist/three_d_repo.css'
			}
        },

        uglify: {
            options: {
				sourceMap : true,
				mangle: false
            },

			allJS: {
				files: {
					'public/dist/three_d_repo.min.js': ['public/dist/three_d_repo.js']
				}
			}
		},

        jshint: {
            files: ['js/core/**/*.js', 'public/plugins/**/*.js', 'services/*.js', 'public/js/*.js'],
            options: {
                bitwise: false,
                curly: true,
                eqeqeq: true,
                forin: true,
                freeze: true,
                futurehostile: true,
                strict: true,
                unused: true,
                varstmt: false,
                strict: false,
                esnext: true,
                expr: true,
                newcap: false,
                // options here to override JSHint defaults
                globals: {
                    console: true,
                    module: true,
                    document: true
                }
            },

            backend:{
                files: { src: [
                    'backend/db/**/*.js',
                    'backend/services/**/*.js',
                    'backend/routes/**/*.js',
                    'backend/libs/**/*.js',
                    'backend/models/**/*.js',
                    'backend/*.js'
                ]},
            }

        },

        mochaTest: {
          unit: {
            options: {
              reporter: 'spec',
              quiet: false, // Optionally suppress output to standard out (defaults to false)
              clearRequireCache: false // Optionally clear the require cache before running tests (defaults to false)
            },
            src: ['backend/test/unit/**/*.js']
          },

          integrated: {
            options: {
              reporter: 'spec',
              timeout: 10000,
              quiet: false, // Optionally suppress output to standard out (defaults to false)
              clearRequireCache: false // Optionally clear the require cache before running tests (defaults to false)
            },
            src: ['backend/test/integrated/**/*.js']
          }
        },

		webfont: {
			icons: {
				src: 'icons/*.svg',
				dest: 'public/css/fonts',
				destCss: 'public/css/external',
                options: {
				    font: 'three-d-repo',
				    fontFilename: 'three-d-repo',
				    htmlDemo: false
			    }
			}
		},

		cssmin: {
			options: {
				shorthandCompacting: false,
				roundingPrecision: -1
			},
			allCSS: {
				files: {
					'public/dist/three_d_repo.min.css': ['public/dist/three_d_repo.css']
				}
			}
		},

        watch: {
            // Running watch may throw an ENOSPC error see:
            // http://stackoverflow.com/questions/22475849/node-js-error-enospc
            // Fix:
            // echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
            js: {
                files: ['frontend/**/**.js'],
                tasks: ['concat:allJS', 'uglify:allJS']
            },
            css: {
                files: ['frontend/**/**.css'],
                tasks: ['concat:allCSS', 'cssmin:allCSS']
            },
            jade: {
                files: ['frontend/**/**.jade'],
                tasks: ['']
            },
            options: {
                livereload: true
            }

        },

    });


    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-mocha-test');
    grunt.loadNpmTasks('grunt-webfont');
    grunt.loadNpmTasks('grunt-contrib-cssmin');
    grunt.loadNpmTasks('grunt-env');
    grunt.loadNpmTasks('grunt-contrib-watch');

    grunt.registerTask('default', ['concat', 'uglify', 'webfont', 'concat:allJS','concat:allCSS', 'uglify:allJS', 'cssmin:allCSS']);
    grunt.registerTask('test', ['jshint:backend', 'mochaTest:unit']);
    grunt.registerTask('test-integrated', ['env:test', 'mochaTest:integrated']);
    grunt.registerTask('frontend', ['concat:allJS','concat:allCSS', 'uglify:allJS', 'cssmin:allCSS']);

    grunt.event.on('watch', function(action, filepath, target) {
        grunt.log.writeln('Watch: ' + filepath + ' has ' + action);
{'fraction_non_alphanumeric': 0.14660012476606363, 'fraction_numerical': 0.004158868787689748, 'mean_word_length': 1.4804022692109335, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5846891', 'n_tokens_mistral': 3280, 'n_tokens_neox': 2847, 'n_words': 502}