<commit_before>module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),

    // Define clean task
    clean: {
      options: {
        dot: true
      },
      dist: ['build', 'dist/*']
    },

    /**
    * Build Asciidoctor.js with bundle and rake
    */
    shell: {  // Task
      bundleInstall: {                        // Target
        options: {                        // Options
          stderr: false
        },
        command: 'bundle install'
      },
      rakeDist: {                        // Target
        options: {                        // Options
          stderr: false
        },
        command: 'bundle exec rake dist'
      },
      rakeExamples: {                        // Target
        options: {                        // Options
          stderr: false
        },
        command: 'bundle exec rake examples'
      }
    },

    /**
    * Generate file with npm format
    */
    concat: {
      npmCore: {
        src: [
          'src/npm/prepend-core.js',
          'build/asciidoctor-core.js',
          'src/npm/append-core.js'
        ],
        dest: 'build/npm/asciidoctor-core.js'
      },
      npmCoreMin: {
        src: [
          'src/npm/prepend-core.js',
          'build/asciidoctor-core.js',
          'src/npm/append-core-min.js'
        ],
        dest: 'build/npm/asciidoctor-core-min.js'
      },
      npmExtensions: {
        src: [
          'src/npm/prepend-extensions.js',
          'build/asciidoctor-extensions.js',
          'src/append-require-extensions.js',
          'src/npm/append-extensions.js'
        ],
        dest: 'build/npm/asciidoctor-extensions.js'
      },
      npmDocbook: {
        src: [
          'src/npm/prepend-extensions.js',
          'build/asciidoctor-docbook45.js',
          'build/asciidoctor-docbook5.js',
          'src/append-require-docbook.js',
          'src/npm/append-extensions.js'
        ],
        dest: 'build/npm/asciidoctor-docbook.js'
      },
      docbook: {
        src: [
          'build/asciidoctor-docbook45.js',
          'build/asciidoctor-docbook5.js',
          'src/append-require-docbook.js'
        ],
        dest: 'build/asciidoctor-docbook.js'
      },
      coreExtensions: {
        src: [
          'build/asciidoctor-core.js',
          'build/asciidoctor-extensions.js',
          'src/append-require-core.js',
          'src/append-require-extensions.js'
        ],
        dest: 'build/asciidoctor.js'
      },
      all: {
        src: [
          'bower_components/opal/opal/current/opal.js',
          'build/asciidoctor-core.js',
          'build/asciidoctor-extensions.js',
          'src/append-require-core.js',
          'src/append-require-extensions.js'
        ],
        dest: 'build/asciidoctor-all.js'
      },
      core: {
        src: [
          'build/asciidoctor-core.js',
          'src/append-require-core.js'
        ],
        dest: 'build/asciidoctor-core.js'
      }
    },

    /**
    * Minify all js
    */
    uglify: {
      dist: {
        files: {
          'dist/npm/asciidoctor-core.min.js': ['build/npm/asciidoctor-core-min.js'],
          'dist/npm/asciidoctor-extensions.min.js': ['build/npm/asciidoctor-extensions.js'],
          'dist/npm/asciidoctor-docbook.min.js': ['build/npm/asciidoctor-docbook.js'],
          'dist/asciidoctor-core.min.js': ['build/asciidoctor-core.js'],
          'dist/asciidoctor-extensions.min.js': ['build/asciidoctor-extensions.js'],
          'dist/asciidoctor-docbook.min.js': ['build/asciidoctor-docbook.js'],
          'dist/asciidoctor-all.min.js': ['build/asciidoctor-all.js']
        }
      }
    },

    /**
    * Copy unminified files
    */
    copy: {
      dist: {
        files: [{
          expand: true,
          cwd: 'build/',
          src: ['**/*.js', '!**/*-min.js', '!**/*.min.js', '!**/*-docbook45.js', '!**/*-docbook5.js'],
          dest: 'dist/',
          filter: 'isFile'
        },
        {<commit_msg>Set max line length for uglify to 500<commit_after>module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),

    // Define clean task
    clean: {
      options: {
        dot: true
      },
      dist: ['build', 'dist/*']
    },

    /**
    * Build Asciidoctor.js with bundle and rake
    */
    shell: {  // Task
      bundleInstall: {                        // Target
        options: {                        // Options
          stderr: false
        },
        command: 'bundle install'
      },
      rakeDist: {                        // Target
        options: {                        // Options
          stderr: false
        },
        command: 'bundle exec rake dist'
      },
      rakeExamples: {                        // Target
        options: {                        // Options
          stderr: false
        },
        command: 'bundle exec rake examples'
      }
    },

    /**
    * Generate file with npm format
    */
    concat: {
      npmCore: {
        src: [
          'src/npm/prepend-core.js',
          'build/asciidoctor-core.js',
          'src/npm/append-core.js'
        ],
        dest: 'build/npm/asciidoctor-core.js'
      },
      npmCoreMin: {
        src: [
          'src/npm/prepend-core.js',
          'build/asciidoctor-core.js',
          'src/npm/append-core-min.js'
        ],
        dest: 'build/npm/asciidoctor-core-min.js'
      },
      npmExtensions: {
        src: [
          'src/npm/prepend-extensions.js',
          'build/asciidoctor-extensions.js',
          'src/append-require-extensions.js',
          'src/npm/append-extensions.js'
        ],
        dest: 'build/npm/asciidoctor-extensions.js'
      },
      npmDocbook: {
        src: [
          'src/npm/prepend-extensions.js',
          'build/asciidoctor-docbook45.js',
          'build/asciidoctor-docbook5.js',
          'src/append-require-docbook.js',
          'src/npm/append-extensions.js'
        ],
        dest: 'build/npm/asciidoctor-docbook.js'
      },
      docbook: {
        src: [
          'build/asciidoctor-docbook45.js',
          'build/asciidoctor-docbook5.js',
          'src/append-require-docbook.js'
        ],
        dest: 'build/asciidoctor-docbook.js'
      },
      coreExtensions: {
        src: [
          'build/asciidoctor-core.js',
          'build/asciidoctor-extensions.js',
          'src/append-require-core.js',
          'src/append-require-extensions.js'
        ],
        dest: 'build/asciidoctor.js'
      },
      all: {
        src: [
          'bower_components/opal/opal/current/opal.js',
          'build/asciidoctor-core.js',
          'build/asciidoctor-extensions.js',
          'src/append-require-core.js',
          'src/append-require-extensions.js'
        ],
        dest: 'build/asciidoctor-all.js'
      },
      core: {
        src: [
          'build/asciidoctor-core.js',
          'src/append-require-core.js'
        ],
        dest: 'build/asciidoctor-core.js'
      }
    },

    /**
    * Minify all js
    */
    uglify: {
      dist: {
        options: {
              maxLineLen: 500
        },
        files: {
          'dist/npm/asciidoctor-core.min.js': ['build/npm/asciidoctor-core-min.js'],
          'dist/npm/asciidoctor-extensions.min.js': ['build/npm/asciidoctor-extensions.js'],
          'dist/npm/asciidoctor-docbook.min.js': ['build/npm/asciidoctor-docbook.js'],
          'dist/asciidoctor-core.min.js': ['build/asciidoctor-core.js'],
          'dist/asciidoctor-extensions.min.js': ['build/asciidoctor-extensions.js'],
          'dist/asciidoctor-docbook.min.js': ['build/asciidoctor-docbook.js'],
          'dist/asciidoctor-all.min.js': ['build/asciidoctor-all.js']
        }
      }
    },

    /**
    * Copy unminified files
    */
    copy: {
      dist: {
        files: [{
          expand: true,
          cwd: 'build/',
          src: ['**/*.js', '!**/*-min.js', '!**/*.min.js', '!**/*-docbook45.js', '!**/*-docbook5.js'],
          dest: 'dist/',
          filter: 'isFile'
        },
        {
{'fraction_non_alphanumeric': 0.15461997019374069, 'fraction_numerical': 0.0029806259314456036, 'mean_word_length': 1.4234125789948842, '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': '446399', 'n_tokens_mistral': 2661, 'n_tokens_neox': 2626, 'n_words': 332}