<commit_before>module.exports = function (grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    uglify: {
      build: {
        src: 'build.js',
        dest: 'build.min.js'
      }
    },
    jshint: {
      options: {
        jshintrc: '.jshintrc',
      },
      uses_defaults: ['index.js', 'lib/**/*.js'],
      tests: {
        options: {
          expr: true
        },
        files: {
          src: ['test/**/*.js']
        }
      }
    },
    browserify: {
      libs: {
        src: ['three', './adapters/*.js', './vendor/collada_loader'],
        dest: './libs.js',
        options: {
          alias: [
            'three:three',
            './vendor/collada_loader:collada_loader'
          ],
          aliasMappings: {
            src: ['./adapters/*.js'],
            dest: 'adapters/',
            flatten: true
          }
        }
      },
      standins: {
        src: ['./test/standins/*.js'],
        dest: './standins.js',
        options: {
          aliasMappings: {
            src: ['./test/standins/*.js'],
            dest: 'adapters/',
            flatten: true
          }
        }
      },
      dist: {
        options: {
          external: ['three', 'collada_loader', 'adapters/renderer', 'adapters/transport']
        },
        src: ['./index.js'],
        dest: './build.js',
        transform: ['brfs']
      }
    },
    simplemocha: {
      options: {
        globals: [],
        timeout: 3000,
        ignoreLeaks: false,
        ui: 'bdd',
        reporter: 'nyan'
      },
      all: { src: ['test/setup.js', 'test/**/*.js'] }
    },
    watch: {
      lib: {
        files: ['index.js', 'lib/**/*', 'test/**/*.js'],
        tasks: ['browserify:standins', 'browserify:dist', 'simplemocha']
      }
    },
    connect: {
      server: {
        options: {
          port: 8000,
          base: '.',
          keepalive: true
        }
      }
    }
  });

  grunt.loadNpmTasks('grunt-browserify');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-simple-mocha');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-connect');
  grunt.registerTask('default', ['jshint', 'browserify', 'simplemocha', 'uglify']);
};<commit_msg>Rebuild libs when adapters change<commit_after>module.exports = function (grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    uglify: {
      build: {
        src: 'build.js',
        dest: 'build.min.js'
      }
    },
    jshint: {
      options: {
        jshintrc: '.jshintrc',
      },
      uses_defaults: ['index.js', 'lib/**/*.js'],
      tests: {
        options: {
          expr: true
        },
        files: {
          src: ['test/**/*.js']
        }
      }
    },
    browserify: {
      libs: {
        src: ['three', './adapters/*.js', './vendor/collada_loader'],
        dest: './libs.js',
        options: {
          alias: [
            'three:three',
            './vendor/collada_loader:collada_loader'
          ],
          aliasMappings: {
            src: ['./adapters/*.js'],
            dest: 'adapters/',
            flatten: true
          }
        }
      },
      standins: {
        src: ['./test/standins/*.js'],
        dest: './standins.js',
        options: {
          aliasMappings: {
            src: ['./test/standins/*.js'],
            dest: 'adapters/',
            flatten: true
          }
        }
      },
      dist: {
        options: {
          external: ['three', 'collada_loader', 'adapters/renderer', 'adapters/transport']
        },
        src: ['./index.js'],
        dest: './build.js',
        transform: ['brfs']
      }
    },
    simplemocha: {
      options: {
        globals: [],
        timeout: 3000,
        ignoreLeaks: false,
        ui: 'bdd',
        reporter: 'nyan'
      },
      all: { src: ['test/setup.js', 'test/**/*.js'] }
    },
    watch: {
      dist: {
        files: ['index.js', 'lib/**/*.js', 'test/**/*.js'],
        tasks: ['browserify:standins', 'browserify:dist', 'simplemocha']
      },
      libs: {
        files: ['adapters/**/*'],
        tasks: ['browserify:libs']
      }
    },
    connect: {
      server: {
        options: {
          port: 8000,
          base: '.',
          keepalive: true
        }
      }
    }
  });

  grunt.loadNpmTasks('grunt-browserify');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-simple-mocha');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-connect');
  grunt.registerTask('default', ['jshint', 'browserify', 'simplemocha', 'uglify']);
};
{'fraction_non_alphanumeric': 0.18524798643493007, 'fraction_numerical': 0.003391267486222976, 'mean_word_length': 1.574468085106383, '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': '7265705', 'n_tokens_mistral': 1602, 'n_tokens_neox': 1569, 'n_words': 239}