<commit_before>// The grunt wrapper
module.exports = function(grunt) {

	/* Cool task timer */
	require('time-grunt')(grunt);

	/* Init */
	grunt.initConfig({
		pkg 	: grunt.file.readJSON('package.json'), 	 // link to package file
		
		/* SETUP :  directory paths */
		dirs 	: {
			sass 		: 'css/sass',
			css 		: 'css',
			jsLib 		: 'js/lib',
			jsPlugins	: 'js/plugins',
			jsBuild 	: 'js/build',
			js 			: 'js'
		},

		/*
		Auto run / default tasks 
		- - - - - - - - - - - - - - - - - - - - - -
		these are handled in the correct order by the grunt 
		watch task, these are all triggered by simply running
		the grunt command.
		
		TASK : Compile SASS */
		sass 	: {
			options : {                       			
				style 			: 'expanded',
				trace 			: true,
				sourcemap 		: true,
				cacheLocation 	: '<%= dirs.sass %>/.sass-cache',
				noCache 		: false
			 },
			dist 	: {
				files 	: [{
					expand 	: true,
					cwd 	: '<%= dirs.sass %>/', 			// search relative to this path
					src 	: ['*.scss'],					// pattern to match
					dest 	: '<%= dirs.css %>/',			// destination path
					ext 	: '.css'						// Dest filepaths will have this extension.
				}]
			}
		},

		// TASK : combine all the media queries
		cmq 	: {
			your_target: {
				files: {
					'<%= dirs.css %>'	: ['<%= dirs.css %>/*.css','!<%= dirs.css %>/*.min.css']
				}
			}
		},


		// TASK : minfy css as cmq task uncompresses the process sass
		cssmin: {
			minify: {
				expand: true,
				cwd: '<%= dirs.css %>/',
				src: ['*.css', '!*.min.css'],
				dest: '<%= dirs.css %>',
				ext: '.min.css'
			}
		},

		// TASK : concatenate JS plugin files
		concat 	: {
			options : {
					 separator  : '; \n \n',	// safety ; and 16 line breaks
				 },
			doLib 	: {
				src 	: [
					'<%= dirs.jsLib %>/jquery.js',
					'<%= dirs.jsLib %>/underscore.js',
					'<%= dirs.jsLib %>/velocity.js',
					'<%= dirs.jsLib %>/velocityui.js',
				],
				dest 	: '<%= dirs.jsBuild %>/libs.js',
			},
			doPlugins : {
				src 	: '<%= dirs.jsPlugins %>/*.js',
				dest 	: '<%= dirs.jsBuild %>/plugins.js'
			},
		},

		// TASK : minify scripts 
		uglify: {
			my_target: {
				options : {
					sourceMap: true
				},
				files: [{
					expand 	: true,
					cwd 	: '<%= dirs.jsBuild %>',
					src 	: '*.js',
					dest 	: '<%= dirs.js %>',
					ext 	: '.min.js'
				}]
			}
		}, 

		// TASK : Watch files for changes and run tasks
		watch 	: {
			css 	: {
				options: {
					livereload: true,
				},
				files 	: 'css/sass/*.scss',
				tasks	: ['sass','cmq','cssmin']
			},
			js 		: {
				files 	: ['<%= dirs.jsPlugins %>/*.js','<%= dirs.jsLib %>/*.js'],
				tasks 	: ['concat']
			},
			mini 	: {
				files 	: '<%= dirs.jsBuild %>',
				tasks 	: ['uglify']
			}
		},

		/* 
		NON Automated Tasks  
		- - - - - - - - - - - - - - - - - - - - - -
		these need to run explicity from the command line 
		by running grunt <task-name>
		*/

		// Testing Tasks
		testjs 	: {
			jshint: {
			    all: ['js/*.js', '!js/plugins.min.js', '!js/lib.min.js']
			  }
		}, 


		//Bower Build
		bowercopy: {
		    options: {
		        srcPrefix: 'bower_components'
		    },
		    jslibs: {
		        options: {
		            destPrefix: 'js/lib'
		        },
		        files: {
		            'jquery.js': 		'jquery/dist/jquery.js',
		            'underscore.js': 	'underscore/underscore.js',
		            'velocity.js': 		'velocity/jquery.velocity.js',
		            'velocityui.js': 	'velocity/velocity.ui.js',
		            'fastclick.js': 	'fastclick/:main'
		        }
		    },
		    sassPlugins: {
		    	options: {
		    		destPrefix: 'css/sass/lib'
		    	},
		    	files : {
		    		'_normalize.scss' : 'normalize-css/:main',
		    		'_knife.sass' : 'knife/_knife.sass',
		    		'susy' : 'susy/sass/*',
		    		'breakpoint' : 'compass-breakpoint/stylesheets/*',
		    	}
		    }
		}

	});

	/* 
	Set up Grunt Plugin Dependencies 
	- - - - - - - - - - - - - - - - - - - - - -
		NB : doing this explicity for easier 
		control that autoloading 
	*/<commit_msg>g-file<commit_after>// The grunt wrapper
module.exports = function(grunt) {

	/* Cool task timer */
	require('time-grunt')(grunt);

	/* Init */
	grunt.initConfig({
		pkg 	: grunt.file.readJSON('package.json'), 	 // link to package file
		
		/* SETUP :  directory paths */
		dirs 	: {
			sass 		: 'css/sass',
			css 		: 'css',
			jsLib 		: 'js/lib',
			jsPlugins	: 'js/plugins',
			jsBuild 	: 'js/build',
			js 			: 'js'
		},

		/*
			Auto run / default tasks 
			- - - - - - - - - - - - - - - - - - - - - -
			these are handled in the correct order by the grunt 
			watch task, these are all triggered by simply running
			the grunt command.
		
		TASK : Compile SASS */
		sass 	: {
			options : {                       			
				style 			: 'expanded',
				trace 			: true,
				sourcemap 		: true,
				cacheLocation 	: '<%= dirs.sass %>/.sass-cache',
				noCache 		: false
			 },
			dist 	: {
				files 	: [{
					expand 	: true,
					cwd 	: '<%= dirs.sass %>/', 			// search relative to this path
					src 	: ['*.scss'],					// pattern to match
					dest 	: '<%= dirs.css %>/',			// destination path
					ext 	: '.min.css'					// Dest filepaths will have this extension.
				}]
			}
		},

		// TASK : combine all the media queries
		cmq 	: {
			your_target: {
				files: {
					'<%= dirs.css %>'	: ['<%= dirs.css %>/*.css','!<%= dirs.css %>/*.min.css']
				}
			}
		},


		// TASK : minfy css as cmq task uncompresses the process sass
		cssmin: {
			minify: {
				expand: true,
				cwd: '<%= dirs.css %>/',
				src: ['*.css', '!*.min.css'],
				dest: '<%= dirs.css %>',
				ext: '.min.css'
			}
		},

		// TASK : concatenate JS plugin files
		concat 	: {
			options : {
					 separator  : '; \n \n',	// safety ; and 16 line breaks
				 },
			doLib 	: {
				src 	: [
					'<%= dirs.jsLib %>/jquery.js',
					'<%= dirs.jsLib %>/underscore.js',
					'<%= dirs.jsLib %>/velocity.js',
					'<%= dirs.jsLib %>/velocityui.js',
					'<%= dirs.jsLib %>/fastclick.js',
				],
				dest 	: '<%= dirs.jsBuild %>/libs.js',
			},
			doPlugins : {
				src 	: '<%= dirs.jsPlugins %>/*.js',
				dest 	: '<%= dirs.jsBuild %>/plugins.js'
			},
		},

		// TASK : minify scripts 
		uglify: {
			my_target: {
				options : {
					sourceMap: true
				},
				files: [{
					expand 	: true,
					cwd 	: '<%= dirs.jsBuild %>',
					src 	: '*.js',
					dest 	: '<%= dirs.js %>',
					ext 	: '.min.js'
				}]
			}
		}, 

		// TASK : Watch files for changes and run tasks
		watch 	: {
			css 	: {
				options: {
					livereload: true,
				},
				files 	: 'css/sass/*.scss',
				tasks	: ['sass','cmq','cssmin']
			},
			js 		: {
				files 	: ['<%= dirs.jsPlugins %>/*.js','<%= dirs.jsLib %>/*.js'],
				tasks 	: ['concat']
			},
			mini 	: {
				files 	: '<%= dirs.jsBuild %>',
				tasks 	: ['uglify']
			}
		},

		/* 
			NON Automated Tasks  
			- - - - - - - - - - - - - - - - - - - - - -
			these need to run explicity from the command line 
			by running grunt <task-name>, look for the regstered task names
			at the end of the file.
		*/

		// Testing Tasks
		testjs 	: {
			jshint: {
			    all: ['js/*.js', '!js/plugins.min.js', '!js/lib.min.js']
			  }
		}, 


		//Bower Build
		bowercopy: {
		    options: {
		        srcPrefix: 'bower_components'
		    },
		    jslibs: {
		        options: {
		            destPrefix: 'js/lib'
		        },
		        files: {
		            'jquery.js': 		'jquery/dist/jquery.js',
		            'underscore.js': 	'underscore/underscore.js',
		            'velocity.js': 		'velocity/jquery.velocity.js',
		            'velocityui.js': 	'velocity/velocity.ui.js',
		            'fastclick.js': 	'fastclick/:main'
		        }
		    },
		    sassPlugins: {
		    	options: {
		    		destPrefix: 'css/sass/lib'
		    	},
		    	files : {
		    		'_normalize.scss' : 	'normalize-css/:main',
		    		'_knife.sass' : 		'knife/_knife.sass',
		    		'susy' : 				'susy/sass/*',
		    		'breakpoint' : 			'compass-breakpoint/stylesheets/*',
		    	}
		    }
		}

	});

	/* 
	Set up Grunt Plugin Dependencies 
	- - - - - - - - - - - - - - - - - - - - - -
		NB : doing this explicity for easier 
		control that autoloading 
	*/
{'fraction_non_alphanumeric': 0.18969756577329727, 'fraction_numerical': 0.0004917629702483403, 'mean_word_length': 1.569488313329122, 'pattern_counts': {'":': 0, '<': 46, '<?xml version=': 0, '>': 46, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3770409', 'n_tokens_mistral': 4040, 'n_tokens_neox': 3166, 'n_words': 608}