<commit_before>module.exports = function(grunt) {
  'use strict';

  // check task runtime
  require('time-grunt')(grunt);

  // load generic configs
  var configs = require('dalek-build-tools');

  // project config
  grunt.initConfig({

    // load module meta data
    pkg: grunt.file.readJSON('package.json'),

    // define a src set of files for other tasks
    src: {
      lint: ['Gruntfile.js', 'lib/**/*.js', 'test/*.js'],
      complexity: ['lib/**/*.js'],
      test: ['test/*TEST.js'],
      src: ['lib/dalek.js']
    },

    // clean automatically generated helper files & docs
    clean: configs.clean,

    // speed up build by defining concurrent tasks
    concurrent: configs.concurrent,

    // linting
    jshint: configs.jshint,

    // testing
    mochaTest: configs.mocha,

    // code metrics
    complexity: configs.complexity,
    plato: configs.plato(grunt.file.readJSON('.jshintrc')),

    // api docs
    yuidoc: configs.yuidocs(),

    // up version, tag & commit
    bump: configs.bump({
      pushTo: '<EMAIL>:dalekjs/dalek.git',
      files: ['package.json', 'CONTRIBUTORS.md', 'CHANGELOG.md']
    }),

    // generate contributors file
    contributors: configs.contributors,

    // compress artifacts
    compress: configs.compress,

    // prepare files for grunt-plato to
    // avoid error messages (weird issue...)
    preparePlato: {
      options: {
        folders: [
          'coverage',
          'report',
          'report/coverage',
          'report/complexity',
          'report/complexity/files',
          'report/complexity/files/_js',
          'report/complexity/files/_actions_js',
          'report/complexity/files/_assertions_js',
          'report/complexity/files/_reporter_js',
          'report/complexity/files/_config_js',
          'report/complexity/files/_driver_js',
          'report/complexity/files/_test_js',
          'report/complexity/files/_testsuite_js',
          'report/complexity/files/_timer_js',
        ],
        files: [
          'report.history.json',
          'files/_js/report.history.json',
          'files/_actions_js/report.history.json',
          'files/_assertions_js/report.history.json',
          'files/_reporter_js/report.history.json',
          'files/_config_js/report.history.json',
          'files/_driver_js/report.history.json',
          'files/_test_js/report.history.json',
          'files/_testsuite_js/report.history.json',
          'files/_timer_js/report.history.json',
        ]
      }
    },

    // prepare files & folders for coverage
    prepareCoverage: {
      options: {
        folders: ['coverage', 'report', 'report/coverage'],
        pattern: '[require("fs").realpathSync(__dirname + "/../lib/dalek.js"), require("fs").realpathSync(__dirname + "/../lib/dalek/")]'
      }
    },

    // user docs
    documantix: {
      options: {
        header: 'dalekjs/dalekjs.com/master/assets/header.html',
        footer: 'dalekjs/dalekjs.com/master/assets/footer.html',
        target: 'report/docs'
      },

      // actions
      actions: {
        src: ['lib/dalek/actions.js'],
        options: {
          vars: {
            title: 'DalekJS - Documentation - Actions',
            desc: 'DalekJS - Documentation - Actions',
            docs: true
          }
        }
      },

      // assertions
      assertions: {
        src: ['lib/dalek/assertions.js'],
        options: {
          vars: {
            title: 'DalekJS - Documentation - Actions',
            desc: 'DalekJS - Documentation - Actions',
            docs: true
          }
        }
      },

      // config
      config: {
        src: ['lib/dalek/config.js'],
        options: {
          vars: {
            title: 'DalekJS - Documentation - Config',
            desc: 'DalekJS - Documentation - Config',
            docs: true
          }
        }
      },

    },

    // archive docs
    archive: {
      options: {
        files: ['report/docs/config.html', 'report/docs/actions.html', 'report/docs/assertions.html']
      }
    }

  });

  // load 3rd party tasks
  require('load-grunt-tasks')(grunt);
  grunt.loadTasks('./node_modules/dalek-build-tools/tasks');
  grunt.loadNpmTasks('grunt-documantix');

  // define runner tasks
  grunt.registerTask('lint', 'jshint');
  
  // split test & docs for speed
  grunt.registerTask('test', ['clean:coverage', 'prepareCoverage', 'concurrent:test', 'generateCoverageBadge']);
  grunt.registerTask('docs', ['clean:reportZip', 'clean:report', 'preparePlato', 'concurrent:docs', 'documantix', 'compress']);
  
  // release tasks
  grunt.registerTask('releasePatch', ['test', 'bump-only:patch', 'contributors', 'changelog', 'bump-commit']);
  grunt.registerTask('releaseMinor', ['test', 'bump-only:minor', 'contributors', 'changelog', 'bump-commit']);<commit_msg>fix(gruntfile) Fix doc generation<commit_after>module.exports = function(grunt) {
  'use strict';

  // check task runtime
  require('time-grunt')(grunt);

  // load generic configs
  var configs = require('dalek-build-tools');

  // project config
  grunt.initConfig({

    // load module meta data
    pkg: grunt.file.readJSON('package.json'),

    // define a src set of files for other tasks
    src: {
      lint: ['Gruntfile.js', 'lib/**/*.js', 'test/*.js'],
      complexity: ['lib/**/*.js'],
      test: ['test/*TEST.js'],
      src: ['lib/dalek.js']
    },

    // clean automatically generated helper files & docs
    clean: configs.clean,

    // speed up build by defining concurrent tasks
    concurrent: configs.concurrent,

    // linting
    jshint: configs.jshint,

    // testing
    mochaTest: configs.mocha,

    // code metrics
    complexity: configs.complexity,
    plato: configs.plato(grunt.file.readJSON('.jshintrc')),

    // api docs
    yuidoc: configs.yuidocs(),

    // up version, tag & commit
    bump: configs.bump({
      pushTo: '<EMAIL>:dalekjs/dalek.git',
      files: ['package.json', 'CONTRIBUTORS.md', 'CHANGELOG.md']
    }),

    // generate contributors file
    contributors: configs.contributors,

    // compress artifacts
    compress: configs.compress,

    // prepare files for grunt-plato to
    // avoid error messages (weird issue...)
    preparePlato: {
      options: {
        folders: [
          'coverage',
          'report',
          'report/coverage',
          'report/complexity',
          'report/complexity/files',
          'report/complexity/files/_js',
          'report/complexity/files/_actions_js',
          'report/complexity/files/_assertions_js',
          'report/complexity/files/_reporter_js',
          'report/complexity/files/_config_js',
          'report/complexity/files/_driver_js',
          'report/complexity/files/_test_js',
          'report/complexity/files/_testsuite_js',
          'report/complexity/files/_timer_js',
        ],
        files: [
          'report.history.json',
          'files/_js/report.history.json',
          'files/_actions_js/report.history.json',
          'files/_assertions_js/report.history.json',
          'files/_reporter_js/report.history.json',
          'files/_config_js/report.history.json',
          'files/_driver_js/report.history.json',
          'files/_test_js/report.history.json',
          'files/_testsuite_js/report.history.json',
          'files/_timer_js/report.history.json',
        ]
      }
    },

    // prepare files & folders for coverage
    prepareCoverage: {
      options: {
        folders: ['coverage', 'report', 'report/coverage'],
        pattern: '[require("fs").realpathSync(__dirname + "/../lib/dalek.js"), require("fs").realpathSync(__dirname + "/../lib/dalek/")]'
      }
    },

    // user docs
    documantix: {
      options: {
        header: 'dalekjs/dalekjs.com/master/assets/header.html',
        footer: 'dalekjs/dalekjs.com/master/assets/footer.html',
        target: 'report/docs'
      },

      // actions
      actions: {
        src: ['lib/dalek/actions.js'],
        options: {
          vars: {
            title: 'DalekJS - Documentation - Actions',
            desc: 'DalekJS - Documentation - Actions',
            docs: true
          }
        }
      },

      // assertions
      assertions: {
        src: ['lib/dalek/assertions.js'],
        options: {
          vars: {
            title: 'DalekJS - Documentation - Actions',
            desc: 'DalekJS - Documentation - Actions',
            docs: true
          }
        }
      },

      // config
      config: {
        src: ['lib/dalek/config.js'],
        options: {
          vars: {
            title: 'DalekJS - Documentation - Config',
            desc: 'DalekJS - Documentation - Config',
            docs: true
          }
        }
      },

    },

    // archive docs
    archive: {
      options: {
        files: ['config.html', 'actions.html', 'assertions.html']
      }
    }

  });

  // load 3rd party tasks
  require('load-grunt-tasks')(grunt);
  grunt.loadTasks('./node_modules/dalek-build-tools/tasks');
  grunt.loadNpmTasks('grunt-documantix');

  // define runner tasks
  grunt.registerTask('lint', 'jshint');
  
  // split test & docs for speed
  grunt.registerTask('test', ['clean:coverage', 'prepareCoverage', 'concurrent:test', 'generateCoverageBadge']);
  grunt.registerTask('docs', ['clean:reportZip', 'clean:report', 'preparePlato', 'concurrent:docs', 'documantix', 'compress']);
  
  // release tasks
  grunt.registerTask('releasePatch', ['test', 'bump-only:patch', 'contributors', 'changelog', 'bump-commit']);
  grunt.registerTask('releaseMinor', ['test', 'bump-only:minor', 'contributors', 'changelog', 'bump-commit']);
{'fraction_non_alphanumeric': 0.15211970074812967, 'fraction_numerical': 0.00020781379883624273, 'mean_word_length': 2.187086092715232, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2070347', 'n_tokens_mistral': 3059, 'n_tokens_neox': 2956, 'n_words': 522}