<commit_before>/**
 * Grunt build tasks
 */
/*jshint node:true, camelcase:false */
module.exports = function(grunt) {
	'use strict';

	var path = require('path'),
		//load configurations
		confPaths = require('./grunt-config/paths.js'),
		confHosts = require('./grunt-config/hosts.js'),
		confProperties = require('./grunt-config/properties.js');

	if (!grunt.option('base')) {
		//if working directory hasn't been set (--base option)
		//then jump to the project root folder
		grunt.file.setBase('../');
	}

	//forcing `--gruntfile` flag to current Gruntfile.js
	//since using `.setBase` changes working folder and
	//concurrent tasks won't find Gruntfile.js anymore
	grunt.option('gruntfile', __filename);

	//make rsync path absolute
	if (confPaths.hasOwnProperty('rsync')) {
		confPaths.rsync = path.join(process.cwd(), confPaths.rsync);
	}



	require('load-grunt-tasks')(grunt);

	grunt.loadNpmTasks('sassdown');

	// Project configuration.
	grunt.initConfig({


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


		/**
		 * Project Metadata
		 * ===============================
		 */
		meta: {
			banner: '/* <%= pkg.description %> v<%= pkg.version %> - <%= pkg.author.name %> - Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author.company %> */\n'
		},

		properties: confProperties,


		/**
		 * Project Paths Configuration
		 * ===============================
		 */
		paths: confPaths,


		/**
		 * Remote Hosts Configuration
		 * ===============================
		 */
		hosts: confHosts,


		/**
		 * Clean Task
		 * ===============================
		 */
		clean: {
			options: {
				force: true
			},
			//.tmp ensures usemin defaut staging folder is removed
			//@see https://github.com/rafalgalka/grunt-usemin/commit/c59840e87841dc608340623c939ec74172e34241
			tmp: ['<%= paths.tmp %>', '.tmp'],
			images: ['<%= paths.images %>'],
			js: ['<%= paths.js %>'],
			css: ['<%= paths.css %>'],
			fonts: ['<%= paths.fonts %>'],
			html: ['<%= paths.html %>/<%= properties.viewmatch %>', '<%= paths.html %>/partials'], //html in root and whole partials folder
			styleguide: ['<%= paths.www %>/styleguide']
		},


		/**
		 * Copy Task
		 * ===============================
		 */
		copy: {
			//dev only
			js: {
				expand: true,
				cwd: '<%= paths.assets %>/javascripts/',
				src: '**/*.js',
				dest: '<%= paths.js %>/'
			},
			images: {
				expand: true,
				cwd: '<%= paths.assets %>/images/',
				src: '**',
				dest: '<%= paths.images %>/'
			},
			fonts: {
				expand: true,
				cwd: '<%= paths.assets %>/fonts/',
				src: '**/*.{eot,svg,ttf,woff}',
				dest: '<%= paths.fonts %>/'
			}
		},


		/**
		 * SASS Compilation Tasks
		 * ===============================
		 */
		compass: {

			options: {
				config: path.normalize(__dirname + '/compass.rb')
			},

			watch: {
				options: {
					watch: true,
				}
			},

			dev: {},

			dist: {
				options: {
					force: true,
					environment: 'production'
				}
			}
		},


		/**
		 * JS Concatenation Task
		 * (just banner other stuff is configured by usemin)
		 * ===============================
		 */
		concat: {
			options: {
				stripBanners: true,
				banner: '<%= meta.banner %>'<commit_msg>force bundle exec when project has a Gemfile<commit_after>/**
 * Grunt build tasks
 */
/*jshint node:true, camelcase:false */
module.exports = function(grunt) {
	'use strict';

	var path = require('path'),
		//load configurations
		confPaths = require('./grunt-config/paths.js'),
		confHosts = require('./grunt-config/hosts.js'),
		confProperties = require('./grunt-config/properties.js');

	if (!grunt.option('base')) {
		//if working directory hasn't been set (--base option)
		//then jump to the project root folder
		grunt.file.setBase('../');
	}

	//forcing `--gruntfile` flag to current Gruntfile.js
	//since using `.setBase` changes working folder and
	//concurrent tasks won't find Gruntfile.js anymore
	grunt.option('gruntfile', __filename);

	//make rsync path absolute
	if (confPaths.hasOwnProperty('rsync')) {
		confPaths.rsync = path.join(process.cwd(), confPaths.rsync);
	}



	require('load-grunt-tasks')(grunt);

	grunt.loadNpmTasks('sassdown');

	// Project configuration.
	grunt.initConfig({


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


		/**
		 * Project Metadata
		 * ===============================
		 */
		meta: {
			banner: '/* <%= pkg.description %> v<%= pkg.version %> - <%= pkg.author.name %> - Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author.company %> */\n'
		},

		properties: confProperties,


		/**
		 * Project Paths Configuration
		 * ===============================
		 */
		paths: confPaths,


		/**
		 * Remote Hosts Configuration
		 * ===============================
		 */
		hosts: confHosts,


		/**
		 * Clean Task
		 * ===============================
		 */
		clean: {
			options: {
				force: true
			},
			//.tmp ensures usemin defaut staging folder is removed
			//@see https://github.com/rafalgalka/grunt-usemin/commit/c59840e87841dc608340623c939ec74172e34241
			tmp: ['<%= paths.tmp %>', '.tmp'],
			images: ['<%= paths.images %>'],
			js: ['<%= paths.js %>'],
			css: ['<%= paths.css %>'],
			fonts: ['<%= paths.fonts %>'],
			html: ['<%= paths.html %>/<%= properties.viewmatch %>', '<%= paths.html %>/partials'], //html in root and whole partials folder
			styleguide: ['<%= paths.www %>/styleguide']
		},


		/**
		 * Copy Task
		 * ===============================
		 */
		copy: {
			//dev only
			js: {
				expand: true,
				cwd: '<%= paths.assets %>/javascripts/',
				src: '**/*.js',
				dest: '<%= paths.js %>/'
			},
			images: {
				expand: true,
				cwd: '<%= paths.assets %>/images/',
				src: '**',
				dest: '<%= paths.images %>/'
			},
			fonts: {
				expand: true,
				cwd: '<%= paths.assets %>/fonts/',
				src: '**/*.{eot,svg,ttf,woff}',
				dest: '<%= paths.fonts %>/'
			}
		},


		/**
		 * SASS Compilation Tasks
		 * ===============================
		 */
		compass: {

			options: {
				config: path.normalize(__dirname + '/compass.rb'),
        bundleExec: grunt.file.exists('Gemfile')
			},

			watch: {
				options: {
					watch: true,
				}
			},

			dev: {},

			dist: {
				options: {
					force: true,
					environment: 'production'
				}
			}
		},


		/**
		 * JS Concatenation Task
		 * (just banner other stuff is configured by usemin)
		 * ===============================
		 */
		concat: {
			options: {
				stripBanners: true,
				banner: '<%= meta.banner %>'
{'fraction_non_alphanumeric': 0.2504282821990344, 'fraction_numerical': 0.009967294813891917, 'mean_word_length': 2.8686746987951808, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '464063', 'n_tokens_mistral': 2691, 'n_tokens_neox': 2096, 'n_words': 435}