Manage bower dependencies with grunt-bowercopy

Tracked bower dependencies are located at "src/sizzle" and "test/libs".
The source-destination mapping is in the Gruntfile.

When updating a bower dependency, update the version in bower.json, run
`grunt bower`, and then commit the result. When adding a dependency,
update the bowercopy task accordingly.

Fixes #14615.
Closes gh-1452.

Conflicts:
	bower.json
	test/index.html
This commit is contained in:
Timmy Willison
2013-12-06 15:55:55 -05:00
parent b869d3f1ac
commit c2e0dbdaa5
25 changed files with 17955 additions and 50 deletions

View File

@@ -18,8 +18,6 @@ var releaseVersion,
pkg,
branch,
sizzleLoc = "bower_modules/sizzle",
scpURL = "jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/",
cdnURL = "http://code.origin.jquery.com/",
repoURL = "git@github.com:jquery/jquery.git",
@@ -102,9 +100,6 @@ function initialize( next ) {
if ( !exists( "package.json" ) ) {
die( "No package.json in this directory" );
}
if ( !exists( sizzleLoc ) ) {
die( "Sizzle expected to exist at " + sizzleLoc );
}
pkg = readJSON( "package.json" );
console.log( "Current version is " + pkg.version + "; generating release " + releaseVersion );
@@ -308,15 +303,9 @@ function commitDistFiles( next ) {
// Add files to be committed
git( [ "add", "package.json" ], function() {
git( [ "commit", "-m", "Remove scripts property from package.json" ], function() {
// Add sizzle in a separate commit to avoid a big diff
// Use force to add normally ignored files
git( [ "add", "-f", sizzleLoc ], function() {
git( [ "commit", "-m", "Add sizzle" ], function() {
// Add jquery files for distribution in a final commit
git( [ "add", "-f", devFile, minFile, mapFile ], function() {
git( [ "commit", "-m", releaseVersion ], next, debug );
}, debug );
}, debug );
// Add jquery files for distribution in a final commit
git( [ "add", "-f", devFile, minFile, mapFile ], function() {
git( [ "commit", "-m", releaseVersion ], next, debug );
}, debug );
}, debug );
}, debug );

View File

@@ -26,7 +26,7 @@ module.exports = function( grunt ) {
endFile: "src/outro.js"
},
paths: {
sizzle: "../bower_modules/sizzle/dist/sizzle"
sizzle: "sizzle/dist/sizzle"
},
rawText: {},
onBuildWrite: convert