startFile: "src/intro.js",
endFile: "src/outro.js"
},
+ rawText: {},
onBuildWrite: convert
};
var flag,
done = this.async(),
flags = this.flags,
+ optIn = flags[ "*" ],
name = this.data.dest,
minimum = this.data.minimum,
removeWith = this.data.removeWith,
// *:*:-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" );
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 );