<commit_before>/*!
 * FastGap's Gruntfile
 * http://fastgap.mobi/
 * Licensed under MIT
 */

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

module.exports = function (grunt) {
  "use strict";

  var appConfig = {

    // Default Paths
    paths: {
      src: 'src',
      dist: 'dist',
      bower: 'bower_components'
    },

    // Assets directory
    dirs: {
      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.json
    pkg: grunt.file.readJSON("package.json"),

    // Banner
    banner: '/*!\n' +
            " * FastGap v<%= pkg.version %> (<%= pkg.homepage %>)\n" +
            " * Author: <%= pkg.author %>\n" +
            " * Maintainers: <%= pkg.maintainers %>\n" +
            " * Copyright (c) <%= grunt.template.today(\"yyyy\") %>\n" +
            ' * Licensed under <%= pkg.licenses.type %>\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"
      ]
    },

    /************************************
     * grunt-contrib-concat
     * Concatenate files
     ************************************/
    concat: {
      fastgapControllers: {
        src: [
          // Main
          '<%= paths.src %>/js/controllers/AppController.js',
          '<%= paths.src %>/js/controllers/HomeController.js',
          // Custom
          '<%= paths.src %>/js/controllers/Page1Controller.js',
          '<%= paths.src %>/js/controllers/Page2Controller.js',
          '<%= paths.src %>/js/controllers/Page3Controller.js',
          '<%= paths.src %>/js/controllers/Page4Controller.js',
          '<%= paths.src %>/js/controllers/Page5Controller.js'
        ],
        dest: '<%= paths.dist %>/js/fastgap.controllers.js'
      },
      librariesJs: {
        src: [
          // Main
          '<%= paths.bower %>/zepto/zepto.js',
          '<%= paths.bower %>/fastclick/lib/fastclick.js',
          // Scroll
          '<%= paths.bower %>/overthrow-dist/overthrow.js',
          // Snap.js (menu)
          '<%= paths.bower %>/snapjs/snapjs.js'
        ],
        dest: '<%= paths.dist %>/js/fastgap.libs.js'
      },
      fastgapCore: {
        src: [
          // Main
          '<%= paths.src %>/js/History.js',
          '<%= paths.src %>/js/FG.js',
          '<%= paths.src %>/js/Navigator.js',
          '<%= paths.src %>/js/Transition.js',
          '<%= paths.src %>/js/PageLoad.js',
          '<%= paths.src %>/js/index.js'
        ],
        dest: '<%= paths.dist %>/js/fastgap.core.js'
      },
      fastgap: {
        src: [
          '<%= paths.dist %>/js/fastgap.controllers.js',
          '<%= paths.dist %>/js/fastgap.libs.js',
          '<%= paths.dist %>/js/fastgap.core.js'
        ],
        dest: '<%= paths.dist %>/js/fastgap.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"
        }]
      },
      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: [{
          expand: true,
          cwd: "<%= dirs.js %>/",
          src: buildConfig.jsFiles,
          dest: "<%= paths.dist %>/assets/js"
        }]
      },
      distImages: {
        files: [{
          expand: true,<commit_msg>Update Gruntfile.js<commit_after>/*!
 * FastGap's Gruntfile
 * http://fastgap.mobi/
 * Licensed under MIT
 */

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

module.exports = function (grunt) {
  "use strict";

  var appConfig = {

    // Default Paths
    paths: {
      src: 'src',
      dist: 'dist',
      bower: 'bower_components'
    },

    // Assets directory
    dirs: {
      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.json
    pkg: grunt.file.readJSON("package.json"),

    // Banner
    banner: '/*!\n' +
            " * FastGap v<%= pkg.version %> (<%= pkg.homepage %>)\n" +
            " * Author: <%= pkg.author %>\n" +
            " * Maintainers: <%= pkg.maintainers %>\n" +
            " * Copyright (c) <%= grunt.template.today(\"yyyy\") %>\n" +
            ' * Licensed under <%= pkg.licenses.type %>\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"
      ]
    },

    /************************************
     * grunt-contrib-concat
     * Concatenate files
     ************************************/
    concat: {
      fastgapControllers: {
        src: [
          // Main
          '<%= paths.src %>/js/controllers/AppController.js',
          '<%= paths.src %>/js/controllers/HomeController.js',
          // Custom
          '<%= paths.src %>/js/controllers/Page1Controller.js',
          '<%= paths.src %>/js/controllers/Page2Controller.js',
          '<%= paths.src %>/js/controllers/Page3Controller.js',
          '<%= paths.src %>/js/controllers/Page4Controller.js',
          '<%= paths.src %>/js/controllers/Page5Controller.js'
        ],
        dest: '<%= paths.dist %>/js/fastgap.controllers.js'
      },
      librariesJs: {
        src: [
          // Main
          '<%= paths.bower %>/zepto/zepto.js',
          '<%= paths.bower %>/fastclick/lib/fastclick.js',
          // Scroll
          '<%= paths.bower %>/overthrow-dist/overthrow.js',
          // Snap.js (menu)
          '<%= paths.bower %>/snapjs/snapjs.js'
        ],
        dest: '<%= paths.dist %>/js/fastgap.libs.js'
      },
      fastgapCore: {
        src: [
          // Main
          '<%= paths.src %>/js/History.js',
          '<%= paths.src %>/js/FG.js',
          '<%= paths.src %>/js/Navigator.js',
          '<%= paths.src %>/js/Transition.js',
          '<%= paths.src %>/js/PageLoad.js',
          '<%= paths.src %>/js/index.js'
        ],
        dest: '<%= paths.dist %>/js/fastgap.core.js'
      },
      fastgap: {
        src: [
          '<%= paths.dist %>/js/fastgap.controllers.js',
          '<%= paths.dist %>/js/fastgap.libs.js',
          '<%= paths.dist %>/js/fastgap.core.js'
        ],
        dest: '<%= paths.dist %>/js/fastgap.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: '<%= paths.bower %>/topcoat/font',
          src: '*.otf',
          dest: '<%= paths.dist %>/fonts'
        }]
      },
      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: [{
          expand: true,
          cwd: "<%= dirs.js %>/",
          src: buildConfig.jsFiles,
          dest: "<%= paths.dist %>/assets/js"
        }]
      },
      distImages: {
        files: [{
          expand: true,
{'fraction_non_alphanumeric': 0.20552455867556937, 'fraction_numerical': 0.000914662032379036, 'mean_word_length': 1.403076923076923, 'pattern_counts': {'":': 2, '<': 115, '<?xml version=': 0, '>': 115, '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': '1113841', 'n_tokens_mistral': 3792, 'n_tokens_neox': 3591, 'n_words': 582}