<commit_before>//
// mod-smith
//


'use strict';

module.exports = function (grunt) {
  //
  // Load grunt tasks
  //
  grunt.loadNpmTasks('grunt-autoprefixer');
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-stylus');
  grunt.loadNpmTasks('grunt-eslint');
  grunt.loadNpmTasks('grunt-injector');

  //
  // Display execution time of the tasks
  //
  require('time-grunt')(grunt);

  grunt.initConfig({
    //
    // Package definition
    //
    pkg: grunt.file.readJSON('package.json'),

    //
    // Common module definitions
    //
    self: {
      src: './src',
      dst: './dist',
      tmp: './.tmp'
    },

    //
    // Clean directories
    //
    clean: {
      dist: {
        files: [{
          dot: true,
          src: [
            '<%%= self.tmp %>/*',
            '<%%= self.dst %>/*'
          ]
        }]
      }
    },

    //
    // Inject files
    //
    injector: {
      options: {
        relative: true,
        addRootSlash: false
      },

      stylus: {
        options: {
          transform: function (filePath) {
            return '@import \'' + filePath + '\';';
          },
          starttag: '// injector:stylus:begin',
          endtag: '// injector:stylus:end'
        },
        files: {
          'src/module.styl': [
            '<%%= self.src %>/**/*.styl',
            '!<%%= self.src %>/module.styl'
          ]
        }
      }
    },

    //
    // Compiles Stylus to CSS
    //
    stylus: {
      compile: {
        options: {
          paths: [ '<%%= self.src %>' ],
          'include css': true
        },
        files: {
          '<%%= self.tmp %>/module.css' : '<%%= self.src %>/module.styl'
        }
      }
    },

    //
    // Post-process generated CSS for vendor specific prefixes
    //
    autoprefixer: {
      options: {
        browsers: ['last 1 version']
      },
      dist: {
        files: [{
          expand: true,
          cwd: '<%%= self.tmp %>',
          src: '{,*/}*.css',
          dest: '<%%= self.tmp %>'
        }]
      }
    },

    //
    // Static code checker
    //
    eslint: {
      target: [
        '<%%= self.src %>/**/*.js'
      ]
    }
  });


  //
  // Default task
  //
  grunt.registerTask('default', ['eslint']);
};
<commit_msg>tpl: grunt: Use just-in-time loader for plugins<commit_after>//
// mod-smith
//


'use strict';

module.exports = function (grunt) {
  //
  // Load grunt plugins - just-in-time
  //
  require('jit-grunt')(grunt);

  //
  // Display execution time of the tasks
  //
  require('time-grunt')(grunt);

  grunt.initConfig({
    //
    // Package definition
    //
    pkg: grunt.file.readJSON('package.json'),

    //
    // Common module definitions
    //
    self: {
      src: './src',
      dst: './dist',
      tmp: './.tmp'
    },

    //
    // Clean directories
    //
    clean: {
      dist: {
        files: [{
          dot: true,
          src: [
            '<%%= self.tmp %>/*',
            '<%%= self.dst %>/*'
          ]
        }]
      }
    },

    //
    // Inject files
    //
    injector: {
      options: {
        relative: true,
        addRootSlash: false
      },

      stylus: {
        options: {
          transform: function (filePath) {
            return '@import \'' + filePath + '\';';
          },
          starttag: '// injector:stylus:begin',
          endtag: '// injector:stylus:end'
        },
        files: {
          'src/module.styl': [
            '<%%= self.src %>/**/*.styl',
            '!<%%= self.src %>/module.styl'
          ]
        }
      }
    },

    //
    // Compiles Stylus to CSS
    //
    stylus: {
      compile: {
        options: {
          paths: [ '<%%= self.src %>' ],
          'include css': true
        },
        files: {
          '<%%= self.tmp %>/module.css' : '<%%= self.src %>/module.styl'
        }
      }
    },

    //
    // Post-process generated CSS for vendor specific prefixes
    //
    autoprefixer: {
      options: {
        browsers: ['last 1 version']
      },
      dist: {
        files: [{
          expand: true,
          cwd: '<%%= self.tmp %>',
          src: '{,*/}*.css',
          dest: '<%%= self.tmp %>'
        }]
      }
    },

    //
    // Static code checker
    //
    eslint: {
      target: [
        '<%%= self.src %>/**/*.js'
      ]
    }
  });


  //
  // Default task
  //
  grunt.registerTask('default', ['eslint']);
};

{'fraction_non_alphanumeric': 0.19082070992539002, 'fraction_numerical': 0.0004521817770743839, 'mean_word_length': 1.24, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '2477525', 'n_tokens_mistral': 1518, 'n_tokens_neox': 1491, 'n_words': 251}