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

	// Source and destination paths for tasks:
	var path = {
		src:	'app/src',
		dest:	'app/public',
		bower:	'app/public/bower_components'
	}

	/*
	* $ grunt
	* - Compiles SASS
	* - Minifies CSS to main.min.css
	* - Concats JS to main.js
	* - Minifies JS to main.min.js
	* - Optimises images
	*/
	grunt.registerTask('default', [
		'sass',
		'concat:scripts',
		'cssmin',
		'uglify',
		'imagemin',
		'svgmin'
	]);

	/*
	* $ grunt watch
	* - Watches SASS for changes --> render to CSS + minify
	* - Watches JS for changes --> concat + minify
	*/

	// Set up tasks:
	grunt.initConfig({

		path: path,

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

		// SASS config:
		sass: {
			dist: {
				options: {
					// Allow easy importing of bourbon and neat (via eg. @import "bourbon"):
					loadPath: [
						'<%= path.bower %>/bourbon/dist',
						'<%= path.bower %>/neat/app/assets/stylesheets',
						'<%= path.bower %>/normalize-scss'
					]
				},
				files: {
					'<%= path.dest %>/css/main.css': '<%= path.src %>/css/main.scss'
				}
			}
		},

		// Concatenate multiple source JS files into main.js:
		concat: {
			scripts: {
				src: ['<%= path.src %>/js/*.js'],
				dest: '<%= path.dest %>/js/main.js'
			}
		},

		// Minify CSS (main.css --> main.min.css):
		cssmin: {
			css: {
				files: {
					'<%= path.dest %>/css/main.min.css': ['<%= path.dest %>/css/main.css']
				}
			}
		},

		// Minify JS (main.js --> main.min.js):
		uglify: {
			scripts: {
				files: {
					'<%= path.dest %>/js/main.min.js': ['<%= path.dest %>/js/main.js']
				}
			}
		},

		// Optimise images:
		imagemin: {
			all: {
				files: [{
					expand: true,
					cwd: '<%= path.src %>/img',
					src: ['**/*.{png,jpg,gif}'],
					dest: '<%= path.dest %>/img'
				}]
			}
		},
		
		// Optimise SVGs:
		svgmin: {
			options: {
				plugins: [
					{ cleanupIDs: false },
					{ removeDoctype: false } // Keeps IE happy
				]
			},
			all: {
				files: [{
					expand: true,
					cwd: '<%= path.src %>/img',
					src: '{,*/}*.svg',
					dest: '<%= path.dest %>/img'
				}]
			}
		},

		// Watch tasks:
		watch: {
			css: {
				files: ['<%= path.src %>/css/*.scss'],
				tasks: ['sass', 'cssmin']
			},
			scripts: {<commit_msg>Gruntfile: watch SASS files in subfolders (previously looked in src/css, but not subfolders)<commit_after>module.exports = function(grunt) {

	// Source and destination paths for tasks:
	var path = {
		src:	'app/src',
		dest:	'app/public',
		bower:	'app/public/bower_components'
	}

	/*
	* $ grunt
	* - Compiles SASS
	* - Minifies CSS to main.min.css
	* - Concats JS to main.js
	* - Minifies JS to main.min.js
	* - Optimises images
	*/
	grunt.registerTask('default', [
		'sass',
		'concat:scripts',
		'cssmin',
		'uglify',
		'imagemin',
		'svgmin'
	]);

	/*
	* $ grunt watch
	* - Watches SASS for changes --> render to CSS + minify
	* - Watches JS for changes --> concat + minify
	*/

	// Set up tasks:
	grunt.initConfig({

		path: path,

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

		// SASS config:
		sass: {
			dist: {
				options: {
					// Allow easy importing of bourbon and neat (via eg. @import "bourbon"):
					loadPath: [
						'<%= path.bower %>/bourbon/dist',
						'<%= path.bower %>/neat/app/assets/stylesheets',
						'<%= path.bower %>/normalize-scss'
					]
				},
				files: {
					'<%= path.dest %>/css/main.css': '<%= path.src %>/css/main.scss'
				}
			}
		},

		// Concatenate multiple source JS files into main.js:
		concat: {
			scripts: {
				src: ['<%= path.src %>/js/*.js'],
				dest: '<%= path.dest %>/js/main.js'
			}
		},

		// Minify CSS (main.css --> main.min.css):
		cssmin: {
			css: {
				files: {
					'<%= path.dest %>/css/main.min.css': ['<%= path.dest %>/css/main.css']
				}
			}
		},

		// Minify JS (main.js --> main.min.js):
		uglify: {
			scripts: {
				files: {
					'<%= path.dest %>/js/main.min.js': ['<%= path.dest %>/js/main.js']
				}
			}
		},

		// Optimise images:
		imagemin: {
			all: {
				files: [{
					expand: true,
					cwd: '<%= path.src %>/img',
					src: ['**/*.{png,jpg,gif}'],
					dest: '<%= path.dest %>/img'
				}]
			}
		},
		
		// Optimise SVGs:
		svgmin: {
			options: {
				plugins: [
					{ cleanupIDs: false },
					{ removeDoctype: false } // Keeps IE happy
				]
			},
			all: {
				files: [{
					expand: true,
					cwd: '<%= path.src %>/img',
					src: '{,*/}*.svg',
					dest: '<%= path.dest %>/img'
				}]
			}
		},

		// Watch tasks:
		watch: {
			css: {
				files: ['<%= path.src %>/css/**/*.scss'],
				tasks: ['sass', 'cssmin']
			},
			scripts: {
{'fraction_non_alphanumeric': 0.2130074203404627, 'fraction_numerical': 0.0, 'mean_word_length': 2.0945307224848078, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 43, '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': '1815649', 'n_tokens_mistral': 2280, 'n_tokens_neox': 1806, 'n_words': 370}