Skip to content

Commit 864366d

Browse files
committed
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 facebook#856.
1 parent 36fd1de commit 864366d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Gruntfile.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ module.exports = function(grunt) {
4242

4343
grunt.registerTask('download-previous-version', require('./grunt/tasks/download-previous-version.js'));
4444

45+
grunt.registerTask('delete-build-modules', function() {
46+
if (grunt.file.exists('build/modules')) {
47+
grunt.file.delete('build/modules');
48+
}
49+
});
50+
4551
// Register jsx:debug and :release tasks.
4652
grunt.registerMultiTask('jsx', jsxTask);
4753

@@ -81,6 +87,7 @@ module.exports = function(grunt) {
8187
'download-previous-version'
8288
]);
8389
grunt.registerTask('build:test', [
90+
'delete-build-modules',
8491
'jsx:test',
8592
'version-check',
8693
'populist:test'
@@ -176,6 +183,7 @@ module.exports = function(grunt) {
176183
// Optimized build task that does all of our builds. The subtasks will be run
177184
// in order so we can take advantage of that and only run jsx:debug once.
178185
grunt.registerTask('build', [
186+
'delete-build-modules',
179187
'jsx:debug',
180188
'version-check',
181189
'browserify:basic',

0 commit comments

Comments
 (0)