<commit_before>/*global module:false*/
module.exports = function(grunt) {

	// Project configuration.
	grunt.initConfig({ 
		// Metadata.
		pkg: grunt.file.readJSON('package.json'),
		banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
				'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
				'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
				'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
				' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
		// Task configuration.
		jshint: {
			options: {
				jshintrc: '.jshintrc'
			},
			all: [
				'Gruntfile.js',
				'src/**/*.js'
			]
		},

		clean: {
			docs: ['docs'],
			dist: ['dist']
		},
		
        less: {
            options: {
                sourceMap: false
            },
            css: {
                files: {
                    'dist/<%= pkg.name %>.css': 'dist/<%= pkg.name %>.less'
                }
            }
        }, 

		concat: {
			options: {
				banner: '<%= banner %>',
				stripBanners: true,
				separator: '',
				sourceMap: false
			},
			js: {
				src: ['src/init/*.js', 'src/**/*.js', '!src/hide/*.js'],
				dest: 'dist/<%= pkg.name %>.js'
			},
			less: {
				src: 'src/css/*.less',
				dest: 'dist/<%= pkg.name %>.less'
			}
		},
        cssmin: {
            css: {
                src: 'dist/<%= pkg.name %>.css',
                dest: 'dist/<%= pkg.name %>.min.css'
            },
            options: {
                sourceMap: true
            }
        },
		uglify: {
			options: {
				banner: '<%= banner %>',
				compress: true,
				wrap: true,
				preserveComments: false,
				sourceMap: false,
				sourceMapIncludeSources: false
//				sourceMapIn: 'dist/<%= pkg.name %>.js.map'
			},
			dist: {
				src:  'dist/<%= pkg.name %>.js',
				dest: 'dist/<%= pkg.name %>.min.js'
			}
		},
		ngdocs: {
			options: {
				dest: 'docs',
				html5Mode: false,
				startPage: '#/api/<%= pkg.name %>',
				scripts: [
						  './lib/jquery/2.2.0/jquery.min.js',
                          './lib/angularjs/1.5.0/angular.js',
                          './lib/angularjs/1.5.0/angular-touch.js',
                          './lib/angularjs/1.5.0/angular-animate.js',
						  './lib/hs/hs.js',
						  './dist/<%= pkg.name %>.js'
				],
				styles: [
						  './dist/<%= pkg.name %>.css'
				],
				sourceLink: 'https://github.com/HelpfulScripts/hsLayout/blob/master/{{file}}#L{{codeline}}',
				title: "<%= pkg.name %>",
				bestMatch: true
			},
			hs: {
				src: ['../hs/src/**/*.js'],
				title: 'hs',
				api:true
			},
			hsLayout: {
				src: ['src/**/*.js'],
				title: 'hsLayout',
				api:true
			}
		},
		copy: {
            pre: { },
			docs: { files: [	{
    				expand: true,
    				src: 'lib/hs*/*.js.map',	// copy js.maps
    				dest: 'docs/grunt-scripts',
    				flatten: true
    			}, {
    				expand: true,
    				src: 'lib/hs*/*.css.map',	// copy css.maps
    				dest: 'docs/css',
    				flatten: true
    			}, {
    				expand: true,
    				src: 'data/**/*',		// copy data
    				dest: 'docs/'
    				
    			}, {
    				expand: true,
    				src: 'docs/**/*',		// copy all docs
    				dest: './lib/hsLayout/'
    				
    			}
			]},
			post: {
	            files: [{
	                expand: true, flatten: true,
	                src: ['dist/*'],    dest: './lib/hsLayout/'
	            }]
            }
		},
    
        watch: {
            gruntfile: {
                files: 'Gruntfile.js',
                tasks: ['makeAll']
            },
            css: {
                files: ['src/css/*.less'],
                tasks: ['makeAll']
            },
            js: {
                files: ['src/**/*.js'],
                tasks: ['makeAll']
            },
            lib: {
                files: ['lib/hs/hs.js'],
                tasks: ['makeAll']
            }
		}
	});

	// These plugins provide necessary tasks.
	grunt.loadNpmTasks('grunt-contrib-concat');
	grunt.loadNpmTasks('grunt-contrib-uglify');
	grunt.loadNpmTasks('grunt-contrib-jshint');
	grunt.loadNpmTasks('grunt-contrib-watch');
	grunt.loadNpmTasks('grunt-contrib-cssmin');
	grunt.loadNpmTasks('grunt-ngdocs');
	grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.loadNpmTasks('grunt-contrib-less');

    // ngDoc only.
    grunt.registerTask('makeDocs', ['ngdocs']);
	// Default task.
	grunt.registerTask('makeAll', ['copy:pre', 'jshint', 'clean', 'concat', 'less', 'cssmin', 'uglify', "copy:post", 'ngdocs', "copy:docs"]);
    grunt.registerTask('default', ['makeAll']);

};
<commit_msg>added testing<commit_after>/*global module:false*/
module.exports = function(grunt) {

	// Project configuration.
	grunt.initConfig({ 
		// Metadata.
		pkg: grunt.file.readJSON('package.json'),
		banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
				'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
				'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
				'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
				' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
		// Task configuration.
		jshint: {
			options: {
				jshintrc: '.jshintrc'
			},
			all: [
				'Gruntfile.js',
				'src/**/*.js'
			]
		},

		clean: {
			docs: ['docs'],
			dist: ['dist']
		},
		
        less: {
            options: {
                sourceMap: false
            },
            css: {
                files: {
                    'dist/<%= pkg.name %>.css': 'dist/<%= pkg.name %>.less'
                }
            }
        }, 

		concat: {
			options: {
				banner: '<%= banner %>',
				stripBanners: true,
				separator: '',
				sourceMap: false
			},
			js: {
				src: ['src/init/*.js', 'src/**/*.js', '!src/hide/*.js'],
				dest: 'dist/<%= pkg.name %>.js'
			},
			less: {
				src: 'src/css/*.less',
				dest: 'dist/<%= pkg.name %>.less'
			}
		},
        cssmin: {
            css: {
                src: 'dist/<%= pkg.name %>.css',
                dest: 'dist/<%= pkg.name %>.min.css'
            },
            options: {
                sourceMap: true
            }
        },
		uglify: {
			options: {
				banner: '<%= banner %>',
				compress: true,
				wrap: true,
				preserveComments: false,
				sourceMap: false,
				sourceMapIncludeSources: false
//				sourceMapIn: 'dist/<%= pkg.name %>.js.map'
			},
			dist: {
				src:  'dist/<%= pkg.name %>.js',
				dest: 'dist/<%= pkg.name %>.min.js'
			}
		},
        karma: {
			options: {
			    basePath: './',
				frameworks: ['jasmine'],
				exclude: [ ],
				coverageReporter: { 
				   type : 'html',
				   dir : 'coverage/',
				   subdir: '', 
				   includeAllSources: true
				},
				htmlReporter: {
				    outputDir: 'coverage', // where to put the reports 
				    templatePath: null, // set if you moved jasmine_template.html
				    focusOnFailures: true, // reports show failures on start
				    namedFiles: true, // name files instead of creating sub-directories
				    pageTitle: "My Tests", // page title for reports; browser info by default
				    urlFriendlyName: false, // simply replaces spaces with _ for files/dirs
				    reportName: 'test-performed', // report summary filename; browser info by default
				    // experimental
				    preserveDescribeNesting: false, // folded suites stay folded 
				    foldAll: false // reports start folded (only with preserveDescribeNesting)
				  },
				reporters: ['progress', 'coverage'],
				port: 9876,
				logLevel: 'WARN',  // OFF, ERROR, WARN, INFO, DEBUG
				autoWatch: false,
				browsers: ['Firefox'],
				singleRun: true
			},
		    allNg: {
				coverageReporter: { subdir: './allNg' },
			    preprocessors: {'src/**/*.js': ['coverage']},
			    files: [{src: ['lib/jquery/2.2.0/jquery.min.js', 
				               'lib/angularjs/1.5.0/angular.js',
			                   'lib/angularjs/1.5.0/angular-touch.js',
				               'lib/angularjs/1.5.0/angular-animate.js',
			                   'lib/angularjs/1.5.0/angular-mocks.js',
			                   'lib/angular-ui/1.1.2/ui-bootstrap-tpls.js.css',
			                   'lib/d3js/3.5.3/d3.min.js',
			                   'lib/hs/hs.js', 'src/**/init/*.js', 'src/**/*.js',
			                   'test/unit/*.js'
			                   ]}]
			}
		},

		ngdocs: {
			options: {
				dest: 'docs',
				html5Mode: false,
				startPage: '#/api/<%= pkg.name %>',
				scripts: [
						  './lib/jquery/2.2.0/jquery.min.js',
                          './lib/angularjs/1.5.0/angular.js',
                          './lib/angularjs/1.5.0/angular-touch.js',
                          './lib/angularjs/1.5.0/angular-animate.js',
						  './lib/hs/hs.js',
						  './dist/<%= pkg.name %>.js'
				],
				styles: [
						  './dist/<%= pkg.name %>.css'
				],
				sourceLink: 'https://github.com/HelpfulScripts/hsLayout/blob/master/{{file}}#L{{codeline}}',
				title: "<%= pkg.name %>",
				bestMatch: true
			},
			hs: {
				src: ['../hs/src/**/*.js'],
				title: 'hs',
				api:true
			},
			hsLayout: {
				src: ['src/**/*.js'],
				title: 'hsLayout',
				api:true
			}
		},
		copy: {
            pre: { },
			docs: { files: [	{
    				expand: true,
    				src: 'lib/hs*/*.js.map',	// copy js.maps
    				dest: 'docs/grunt-scripts',
    				flatten: true
    			}, {
    				expand: true,
    				src: 'lib/hs*/*.css.map',	// copy css.maps
    				dest: 'docs/css',
    				flatten: true
    			}, {
    				expand: true,
    				src: 'data/**/*',		// copy data
    				dest: 'docs/'
    				
    			}, {
    				expand: true,
    				src: 'docs/**/*',		// copy all docs
    				dest: './lib/hsLayout/'
    				
    			}
			]},
			post: {
	            files: [{
	                expand: true, flatten: true,
	                src: ['dist/*'],    dest: './lib/hsLayout/'
	            }]
            }
		},
    
        watch: {
            gruntfile: {
                files: 'Gruntfile.js',
                tasks: ['makeAll']
            },
            css: {
                files: ['src/css/*.less'],
                tasks: ['makeAll']
            },
            js: {
                files: ['src/**/*.js'],
                tasks: ['makeAll']
            },
            lib: {
                files: ['lib/hs/hs.js'],
                tasks: ['makeAll']
            }
		}
	});

	// These plugins provide necessary tasks.
	grunt.loadNpmTasks('grunt-contrib-concat');
	grunt.loadNpmTasks('grunt-contrib-uglify');
	grunt.loadNpmTasks('grunt-contrib-jshint');
	grunt.loadNpmTasks('grunt-contrib-watch');
	grunt.loadNpmTasks('grunt-contrib-cssmin');
	grunt.loadNpmTasks('grunt-ngdocs');
    grunt.loadNpmTasks('grunt-karma');
	grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.loadNpmTasks('grunt-contrib-less');

	// test only.
	grunt.registerTask('test', ['karma']);

    // ngDoc only.
    grunt.registerTask('makeDocs', ['ngdocs']);
	// Default task.
	grunt.registerTask('makeAll', ['copy:pre', 'jshint', 'clean', 'concat', 'less', 'cssmin', 'uglify', "copy:post", 'ngdocs', "copy:docs"]);
    grunt.registerTask('default', ['makeAll']);

};

{'fraction_non_alphanumeric': 0.19888609414301114, 'fraction_numerical': 0.004761049227452389, 'mean_word_length': 1.6121539183481934, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, 'https://': 2, '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': '6456360', 'n_tokens_mistral': 4695, 'n_tokens_neox': 3872, 'n_words': 659}