diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/tasks/build.js | 4 | ||||
-rw-r--r-- | build/tasks/lib/slim-build-flags.js | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/build/tasks/build.js b/build/tasks/build.js index e376be6cc..e344f991b 100644 --- a/build/tasks/build.js +++ b/build/tasks/build.js @@ -10,6 +10,7 @@ module.exports = function( grunt ) { const fs = require( "fs" ); const path = require( "path" ); const rollup = require( "rollup" ); + const slimBuildFlags = require( "./lib/slim-build-flags" ); const rollupFileOverrides = require( "./lib/rollup-plugin-file-overrides" ); const Insight = require( "insight" ); const pkg = require( "../../package.json" ); @@ -60,7 +61,6 @@ module.exports = function( grunt ) { const done = this.async(); try { - const slimFlags = [ "-ajax", "-callbacks", "-deferred", "-effects", "-queue" ]; const flags = this.flags; const optIn = flags[ "*" ]; let name = grunt.option( "filename" ); @@ -79,7 +79,7 @@ module.exports = function( grunt ) { if ( flags.slim ) { delete flags.slim; - for ( const flag of slimFlags ) { + for ( const flag of slimBuildFlags ) { flags[ flag ] = true; } } diff --git a/build/tasks/lib/slim-build-flags.js b/build/tasks/lib/slim-build-flags.js new file mode 100644 index 000000000..a3574df21 --- /dev/null +++ b/build/tasks/lib/slim-build-flags.js @@ -0,0 +1,10 @@ +"use strict"; + +// NOTE: keep it in sync with test/data/testinit.js +module.exports = [ + "-ajax", + "-callbacks", + "-deferred", + "-effects", + "-queue" +]; |