@samitouri / QOS-React-2 / commits / 864366d082

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.

Ben Newman committed Jan 27, 2014 at 13:27 UTC 864366d0829c9964ca89abaa86249153bbae2908
1 file changed +8
Gruntfile.js
+8
@@ -42,6 +42,12 @@ module.exports = function(grunt) {
42
43 grunt.registerTask('download-previous-version', require('./grunt/tasks/download-previous-version.js'));
44
45 + grunt.registerTask('delete-build-modules', function() {
46 + if (grunt.file.exists('build/modules')) {
47 + grunt.file.delete('build/modules');
48 + }
49 + });
50 +
51 // Register jsx:debug and :release tasks.
52 grunt.registerMultiTask('jsx', jsxTask);
53
@@ -81,6 +87,7 @@ module.exports = function(grunt) {
87 'download-previous-version'
88 ]);
89 grunt.registerTask('build:test', [
90 + 'delete-build-modules',
91 'jsx:test',
92 'version-check',
93 'populist:test'
@@ -176,6 +183,7 @@ module.exports = function(grunt) {
183 // Optimized build task that does all of our builds. The subtasks will be run
184 // in order so we can take advantage of that and only run jsx:debug once.
185 grunt.registerTask('build', [
186 + 'delete-build-modules',
187 'jsx:debug',
188 'version-check',
189 'browserify:basic',