3 var fs = require( "fs" );
5 module.exports = function( Release ) {
11 "dist/jquery.min.map",
12 "dist/jquery.slim.js",
13 "dist/jquery.slim.min.js",
14 "dist/jquery.slim.min.map"
20 cdn = require( "./release/cdn" ),
21 dist = require( "./release/dist" ),
22 ensureSizzle = require( "./release/ensure-sizzle" ),
24 npmTags = Release.npmTags;
28 issueTracker: "github",
31 * Ensure the repo is in a proper state before release
32 * @param {Function} callback
34 checkRepoState: function( callback ) {
35 ensureSizzle( Release, callback );
39 * Set the version in the src folder for distributing AMD
41 _setSrcVersion: function() {
42 var corePath = __dirname + "/../src/core.js",
43 contents = fs.readFileSync( corePath, "utf8" );
44 contents = contents.replace( /@VERSION/g, Release.newVersion );
45 fs.writeFileSync( corePath, contents, "utf8" );
49 * Generates any release artifacts that should be included in the release.
50 * The callback must be invoked with an array of files that should be
51 * committed before creating the tag.
52 * @param {Function} callback
54 generateArtifacts: function( callback ) {
55 Release.exec( "grunt", "Grunt command failed" );
57 "grunt custom:-ajax,-effects --filename=jquery.slim.js && " +
58 "grunt remove_map_comment --filename=jquery.slim.js",
61 cdn.makeReleaseCopies( Release );
62 Release._setSrcVersion();
63 callback( filesToCommit );
67 * Acts as insertion point for restoring Release.dir.repo
68 * It was changed to reuse npm publish code in jquery-release
69 * for publishing the distribution repo instead
73 // origRepo is not defined if dist was skipped
74 Release.dir.repo = Release.dir.origRepo || Release.dir.repo;
79 * Publish to distribution repo and npm
80 * @param {Function} callback
82 dist: function( callback ) {
83 cdn.makeArchives( Release, function() {
84 dist( Release, distFiles, callback );
90 module.exports.dependencies = [