<commit_before>
/*global module:false*/
module.exports = function(grunt) {

  require('time-grunt')(grunt);

  // Project configuration.
  grunt.initConfig({

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

    // start a node server
    connect: {
      preview: {
        options: {
          port: 9000,
          base: 'preview'
        }
      },
      optimize: {
        options: {
          port: 9001,
          keepalive: true,
          base: 'production'
        }
      }
    },

    // delete everything from preview or production directories before preview or optimize task
    clean: {
      preview: {
        src: 'preview/'
      },
      pre_optimize: {
        src: 'production/'
      },
      post_optimize: {
        src: [
          'production/templates/',
          'production/scripts.ejs',
          'production/head.ejs'
        ]
      }
    },

    ejs_static: {
      preview: {
        options: {
          dest: 'preview',
          path_to_data: 'dev/data/pages.json',
          path_to_layouts: 'dev/templates/layouts',
          index_page: 'home',
          parent_dirs: true,
          underscores_to_dashes: true,
          file_extension: '.html'
        }
      },
      optimize: {
        options: {
          dest: 'production',
          path_to_data: 'dev/data/pages.json',
          path_to_layouts: 'production/templates/layouts',
          index_page: 'home',
          parent_dirs: true,
          underscores_to_dashes: true,
          file_extension: '.html'
        }
      }
    },

    copy: {
      preview: {
        files: [
          {expand: true, cwd: 'dev/', src: ['img/**'], dest: 'preview/'},
          {expand: true, cwd: 'dev/', src: ['css/**'], dest: 'preview/'},
          {expand: true, cwd: 'dev/', src: ['js/**'], dest: 'preview/'},
          {expand: true, cwd: 'dev/', src: ['.ht*'], dest: 'preview/'}
        ]
      },
      optimize: {
        files: [
          {expand: true, cwd: 'dev/', src: ['**'], dest: 'production/'},
          {expand: true, flatten: true, cwd: 'dev/', src: ['css/fonts/**'], dest: 'production/fonts/', filter: 'isFile'}
        ]
      }
    },

    // get the scripts inside scripts.ejs and head.ejs build:js blocks
    'useminPrepare': {
      html: [
        'production/templates/components/global/head.ejs',
        'production/templates/components/global/scripts.ejs'
      ],
      options: {
        dest: 'production',
        root: 'production'
      }
    },

    // update the scripts links to point to the concatenated and minified js/main.js
    usemin: {
      html: [
        'production/templates/components/global/head.ejs',
        'production/templates/components/global/scripts.ejs'<commit_msg>added bower_components to copy task<commit_after>
/*global module:false*/
module.exports = function(grunt) {

  require('time-grunt')(grunt);

  // Project configuration.
  grunt.initConfig({

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

    // start a node server
    connect: {
      preview: {
        options: {
          port: 9000,
          base: 'preview'
        }
      },
      optimize: {
        options: {
          port: 9001,
          keepalive: true,
          base: 'production'
        }
      }
    },

    // delete everything from preview or production directories before preview or optimize task
    clean: {
      preview: {
        src: 'preview/'
      },
      pre_optimize: {
        src: 'production/'
      },
      post_optimize: {
        src: [
          'production/templates/',
          'production/scripts.ejs',
          'production/head.ejs'
        ]
      }
    },

    ejs_static: {
      preview: {
        options: {
          dest: 'preview',
          path_to_data: 'dev/data/pages.json',
          path_to_layouts: 'dev/templates/layouts',
          index_page: 'home',
          parent_dirs: true,
          underscores_to_dashes: true,
          file_extension: '.html'
        }
      },
      optimize: {
        options: {
          dest: 'production',
          path_to_data: 'dev/data/pages.json',
          path_to_layouts: 'production/templates/layouts',
          index_page: 'home',
          parent_dirs: true,
          underscores_to_dashes: true,
          file_extension: '.html'
        }
      }
    },

    copy: {
      preview: {
        files: [
          {expand: true, cwd: 'dev/', src: ['bower_components/**'], dest: 'preview/'},
          {expand: true, cwd: 'dev/', src: ['img/**'], dest: 'preview/'},
          {expand: true, cwd: 'dev/', src: ['css/**'], dest: 'preview/'},
          {expand: true, cwd: 'dev/', src: ['js/**'], dest: 'preview/'},
          {expand: true, cwd: 'dev/', src: ['.ht*'], dest: 'preview/'}
        ]
      },
      optimize: {
        files: [
          {expand: true, cwd: 'dev/', src: ['**'], dest: 'production/'},
          {expand: true, flatten: true, cwd: 'dev/', src: ['css/fonts/**'], dest: 'production/fonts/', filter: 'isFile'}
        ]
      }
    },

    // get the scripts inside scripts.ejs and head.ejs build:js blocks
    'useminPrepare': {
      html: [
        'production/templates/components/global/head.ejs',
        'production/templates/components/global/scripts.ejs'
      ],
      options: {
        dest: 'production',
        root: 'production'
      }
    },

    // update the scripts links to point to the concatenated and minified js/main.js
    usemin: {
      html: [
        'production/templates/components/global/head.ejs',
        'production/templates/components/global/scripts.ejs'
{'fraction_non_alphanumeric': 0.15053181900126195, 'fraction_numerical': 0.002884442040742744, 'mean_word_length': 1.774, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6169772', 'n_tokens_mistral': 1743, 'n_tokens_neox': 1696, 'n_words': 365}