+var fs = require( "fs" );
module.exports = function( Release ) {
"dist/jquery.min.map",
"dist/jquery.slim.js",
"dist/jquery.slim.min.js",
- "dist/jquery.slim.min.map"
+ "dist/jquery.slim.min.map",
+ "src/core.js"
],
cdn = require( "./release/cdn" ),
dist = require( "./release/dist" ),
checkRepoState: function( callback ) {
ensureSizzle( Release, callback );
},
+ /**
+ * Set the version in the src folder for distributing AMD
+ */
+ _setSrcVersion: function() {
+ var corePath = __dirname + "/../src/core.js",
+ contents = fs.readFileSync( corePath, "utf8" );
+ contents = contents.replace( /@VERSION/g, Release.newVersion );
+ fs.writeFileSync( corePath, contents, "utf8" );
+ },
/**
* Generates any release artifacts that should be included in the release.
* The callback must be invoked with an array of files that should be
"Grunt custom failed"
);
cdn.makeReleaseCopies( Release );
+ Release._setSrcVersion();
callback( files );
},
/**
shell.cp( "-rf", Release.dir.repo + "/" + file, Release.dir.dist );
} );
+ // Remove the wrapper from the dist repo
+ shell.rm( "-f", Release.dir.dist + "/src/wrapper.js" );
+
// Write generated bower file
fs.writeFileSync( Release.dir.dist + "/bower.json", generateBower() );