<commit_before>"use strict";

var buildConfig = require('./config/build');

module.exports = function (grunt) {

	require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks);

	var appConfig = {

		// Default Paths
		paths: {
			src: "src",
			dist: "dist"
		},

		// Assets directory
		dirs: {
			js: "<%= paths.src %>/assets/js",
			sass: "<%= paths.src %>/assets/scss",
			css: "<%= paths.src %>/assets/css",
			img: "<%= paths.src %>/assets/images",
			vendor: "<%= paths.src %>/vendor",
			pages: "<%= paths.src %>/pages"
		},

		// Load package.jsom
		pkg: grunt.file.readJSON("package.json"),

		// Metadata
		banner: "\n" +
			"/*\n" +
			" * -------------------------------------------------------\n" +
			" * Project: <%= pkg.name %>\n" +
			" * Version: <%= pkg.version %>\n" +
			" *\n" +
			" *\n" +
			" * Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %>\n" +
			" * -------------------------------------------------------\n" +
			" */\n" +
			"\n",

		// Watch files
		watch: {
			options: {
				livereload: true
			},
			css: {
				files: ["<%= dirs.sass %>/{,*/}*.{scss,sass}"],
				tasks: ["compass", "notify:compass"]
			},
			js: {
				files: ["<%= jshint.all %>"],
				tasks: ["jshint", "uglify", "notify:js"]
			},
			html: {
				files: [
                    // carregamento automático do browser para as atualizações das extensões abaixo
                    "/*.{html,htm,shtml,shtm,xhtml,php,jsp,asp,aspx,erb,ctp}"
                ]
			}
		},

		// Files Validation
		jshint: {
			options: {
				jshintrc: ".jshintrc"
			},
			all: [
                "Gruntfile.js",
                "<%= dirs.js %>/main.js"
            ]
		},

		// Minification
		uglify: {
			options: {
				mangle: false,
				banner: "<%= banner %>"
			}
			// ,
			// dist: {
			//     files: {
			//         "<%= dirs.js %>/main.min.js": [
			//         "<%= dirs.js %>/main.js"
			//         ]
			//     }
			// }
		},

		// Compass for SCSS
		/*compass: {
            dist: {
                options: {
                    force: true,
                    sassDir: "<%= dirs.sass %>",
                    cssDir: "<%= dirs.css %>",
                    banner: "<%= banner %>",
                    specify: "<%= dirs.sass %>/*.scss"
                }
            }
        },*/

		// Notificações
		notify: {
			compass: {
				options: {
					title: "SASS - <%= pkg.title %>",
					message: "Build with success!"
				}
			},
			js: {
				options: {
					title: "Javascript - <%= pkg.title %>",
					message: "Minified and validated with success!"
				}
			}
		},

		copy: {
			/* COPY FONTS FOLDER */
			copyFolder: {
				expand: true,
				flatten: true,
				src: ['src/vendor/topcoat/font/**'],
				dest: 'dist/vendor/topcoat/font',
				filter: 'isFile'
			},
			distVendor: {
				files: [{
					expand: true,
					cwd: "<%= dirs.vendor %>/",
					src: buildConfig.vendorFiles,
					dest: "<%= paths.dist %>/vendor/"
            }]
			},
			distHtml: {
				files: [{
					expand: true,
					cwd: "<%= paths.src %>/",
					src: buildConfig.htmlFiles,
					dest: "<%= paths.dist %>/"
            }]
			},
			distCss: {
				files: [{
					expand: true,
					cwd: "<%= dirs.css %>/",
					src: buildConfig.cssFiles,
					dest: "<%= paths.dist %>/assets/css"
            }]
			},
			distJs: {
				files: [{<commit_msg>fix bug grunt copy font folder<commit_after>"use strict";

var buildConfig = require('./config/build');

module.exports = function (grunt) {

	require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks);

	var appConfig = {

		// Default Paths
		paths: {
			src: "src",
			dist: "dist"
		},

		// Assets directory
		dirs: {
			js: "<%= paths.src %>/assets/js",
			sass: "<%= paths.src %>/assets/scss",
			css: "<%= paths.src %>/assets/css",
			img: "<%= paths.src %>/assets/images",
			vendor: "<%= paths.src %>/vendor",
			pages: "<%= paths.src %>/pages",
			fonts: "<%= paths.src %>/vendor/topcoat/font",
		},

		// Load package.jsom
		pkg: grunt.file.readJSON("package.json"),

		// Metadata
		banner: "\n" +
			"/*\n" +
			" * -------------------------------------------------------\n" +
			" * Project: <%= pkg.name %>\n" +
			" * Version: <%= pkg.version %>\n" +
			" *\n" +
			" *\n" +
			" * Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %>\n" +
			" * -------------------------------------------------------\n" +
			" */\n" +
			"\n",

		// Watch files
		watch: {
			options: {
				livereload: true
			},
			css: {
				files: ["<%= dirs.sass %>/{,*/}*.{scss,sass}"],
				tasks: ["compass", "notify:compass"]
			},
			js: {
				files: ["<%= jshint.all %>"],
				tasks: ["jshint", "uglify", "notify:js"]
			},
			html: {
				files: [
                    // carregamento automático do browser para as atualizações das extensões abaixo
                    "/*.{html,htm,shtml,shtm,xhtml,php,jsp,asp,aspx,erb,ctp}"
                ]
			}
		},

		// Files Validation
		jshint: {
			options: {
				jshintrc: ".jshintrc"
			},
			all: [
                "Gruntfile.js",
                "<%= dirs.js %>/main.js"
            ]
		},

		// Minification
		uglify: {
			options: {
				mangle: false,
				banner: "<%= banner %>"
			}
			// ,
			// dist: {
			//     files: {
			//         "<%= dirs.js %>/main.min.js": [
			//         "<%= dirs.js %>/main.js"
			//         ]
			//     }
			// }
		},

		// Compass for SCSS
		/*compass: {
            dist: {
                options: {
                    force: true,
                    sassDir: "<%= dirs.sass %>",
                    cssDir: "<%= dirs.css %>",
                    banner: "<%= banner %>",
                    specify: "<%= dirs.sass %>/*.scss"
                }
            }
        },*/

		// Notificações
		notify: {
			compass: {
				options: {
					title: "SASS - <%= pkg.title %>",
					message: "Build with success!"
				}
			},
			js: {
				options: {
					title: "Javascript - <%= pkg.title %>",
					message: "Minified and validated with success!"
				}
			}
		},

		copy: {
			/* COPY FONTS FOLDER */
			distFonts: {
				files: [{
					expand: true,
					cwd: "<%= dirs.fonts %>",
					src: "**",
					dest: "<%= paths.dist %>/vendor/topcoat/font"
            }]
			},
			distVendor: {
				files: [{
					expand: true,
					cwd: "<%= dirs.vendor %>/",
					src: buildConfig.vendorFiles,
					dest: "<%= paths.dist %>/vendor/"
            }]
			},
			distHtml: {
				files: [{
					expand: true,
					cwd: "<%= paths.src %>/",
					src: buildConfig.htmlFiles,
					dest: "<%= paths.dist %>/"
            }]
			},
			distCss: {
				files: [{
					expand: true,
					cwd: "<%= dirs.css %>/",
					src: buildConfig.cssFiles,
					dest: "<%= paths.dist %>/assets/css"
            }]
			},
			distJs: {
				files: [{
{'fraction_non_alphanumeric': 0.23846836191602602, 'fraction_numerical': 0.0, 'mean_word_length': 1.4926308032424467, 'pattern_counts': {'":': 2, '<': 62, '<?xml version=': 0, '>': 62, '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': '3980555', 'n_tokens_mistral': 3066, 'n_tokens_neox': 2371, 'n_words': 423}