aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2013-09-08 22:26:05 -0400
committerTimmy Willison <timmywillisn@gmail.com>2013-09-08 22:27:40 -0400
commita289beb688388fb75d16b0a7eed9d29d747f4c5b (patch)
tree54e36a22020acb28b178a0980321ed0fc361dfdd /build
parenta8627a92409317a2a67a1916c4195630c2767e1f (diff)
downloadjquery-a289beb688388fb75d16b0a7eed9d29d747f4c5b.tar.gz
jquery-a289beb688388fb75d16b0a7eed9d29d747f4c5b.zip
Restore optIn behavior for builds
Conflicts: build/tasks/build.js
Diffstat (limited to 'build')
-rw-r--r--build/tasks/build.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/build/tasks/build.js b/build/tasks/build.js
index e0cdc078f..79c7860e1 100644
--- a/build/tasks/build.js
+++ b/build/tasks/build.js
@@ -23,6 +23,7 @@ module.exports = function( grunt ) {
startFile: "src/intro.js",
endFile: "src/outro.js"
},
+ rawText: {},
onBuildWrite: convert
};
@@ -75,6 +76,7 @@ module.exports = function( grunt ) {
var flag,
done = this.async(),
flags = this.flags,
+ optIn = flags[ "*" ],
name = this.data.dest,
minimum = this.data.minimum,
removeWith = this.data.removeWith,
@@ -165,10 +167,9 @@ module.exports = function( grunt ) {
// *:*:-css all except css and dependents (explicit > implicit)
// *:*:-css:+effects same (excludes effects because explicit include is trumped by explicit exclude of dependency)
// *:+effects none except effects and its dependencies (explicit include trumps implicit exclude of dependency)
+ delete flags[ "*" ];
for ( flag in flags ) {
- if ( flag !== "*" ) {
- excluder( flag );
- }
+ excluder( flag );
}
grunt.verbose.writeflags( excluded, "Excluded" );
@@ -201,6 +202,12 @@ module.exports = function( grunt ) {
grunt.file.write( name, compiled );
};
+ // Turn off opt-in if necessary
+ if ( !optIn ) {
+ // Overwrite the default inclusions with the explicit ones provided
+ config.rawText.jquery = "define([" + (included.length ? included.join(",") : "") + "]);";
+ }
+
// Trace dependencies and concatenate files
requirejs.optimize( config, function( response ) {
grunt.verbose.writeln( response );