Remove build/modules/ at beginning of `grunt` and `grunt test`.

Little-known fact: instead of writing copies of compiled module files to
build/modules/, the bin/jsx-internal script actually just makes hard links
to the master versions of files in the .module-cache/, so re-populating
build/modules/ is very inexpensive.

Closes #856.
This commit is contained in:
Ben Newman 2014-01-27 13:27:05 -08:00
parent 36fd1def84
commit 864366d082
1 changed files with 8 additions and 0 deletions

View File

@ -42,6 +42,12 @@ module.exports = function(grunt) {
grunt.registerTask('download-previous-version', require('./grunt/tasks/download-previous-version.js'));
grunt.registerTask('delete-build-modules', function() {
if (grunt.file.exists('build/modules')) {
grunt.file.delete('build/modules');
}
});
// Register jsx:debug and :release tasks.
grunt.registerMultiTask('jsx', jsxTask);
@ -81,6 +87,7 @@ module.exports = function(grunt) {
'download-previous-version'
]);
grunt.registerTask('build:test', [
'delete-build-modules',
'jsx:test',
'version-check',
'populist:test'
@ -176,6 +183,7 @@ module.exports = function(grunt) {
// Optimized build task that does all of our builds. The subtasks will be run
// in order so we can take advantage of that and only run jsx:debug once.
grunt.registerTask('build', [
'delete-build-modules',
'jsx:debug',
'version-check',
'browserify:basic',