Skip to content

Commit

Permalink
Build: drop bower; use npm for front-end deps
Browse files Browse the repository at this point in the history
Fixes #15186
Closes gh-1620

Conflicts:
	bower.json
  • Loading branch information
timmywil committed Jul 17, 2014
1 parent e38a94a commit 79c0732
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 23 deletions.
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@
.sizecache.json

/dist
/bower_components
/node_modules
10 changes: 4 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,18 @@ module.exports = function( grunt ) {
}
}
},
bowercopy: {
npmcopy: {
all: {
options: {
clean: true,
destPrefix: "external"
},
files: {
"sizzle/dist": "sizzle/dist",
"sizzle/MIT-LICENSE.txt": "sizzle/MIT-LICENSE.txt",

"qunit/qunit.js": "qunit/qunit/qunit.js",
"qunit/qunit.css": "qunit/qunit/qunit.css",
"qunit/MIT-LICENSE.txt": "qunit/MIT-LICENSE.txt",
"qunit/qunit.js": "qunitjs/qunit/qunit.js",
"qunit/qunit.css": "qunitjs/qunit/qunit.css",
"qunit/MIT-LICENSE.txt": "qunitjs/MIT-LICENSE.txt",

"requirejs/require.js": "requirejs/require.js",

Expand Down Expand Up @@ -137,7 +136,6 @@ module.exports = function( grunt ) {
// Integrate jQuery specific tasks
grunt.loadTasks( "build/tasks" );

grunt.registerTask( "bower", "bowercopy" );
grunt.registerTask( "lint", [ "jshint", "jscs" ] );

// Short list as a high frequency watch task
Expand Down
6 changes: 0 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@
"Gruntfile.js",
"package.json"
],
"devDependencies": {
"sizzle": "1.11.1",
"requirejs": "2.1.10",
"qunit": "1.14.0",
"sinon": "1.8.1"
},
"keywords": [
"jquery",
"javascript",
Expand Down
19 changes: 15 additions & 4 deletions build/ensure-sizzle.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
var fs = require( "fs" ),
bower = require( "grunt-bowercopy/node_modules/bower" ),
npm = require( "npm" ),
sizzleLoc = __dirname + "/../external/sizzle/dist/sizzle.js",
rversion = /Engine v(\d+\.\d+\.\d+(?:-\w+)?)/;

require( "colors" );

/**
* Retrieve the latest tag of Sizzle from bower
* Retrieve the latest tag of Sizzle from npm
* @param {Function(string)} callback
*/
function getLatestSizzle( callback ) {
bower.commands.info( "sizzle", "version" )
.on( "end", callback );
npm.load(function( err, npm ) {
if ( err ) {
throw err;
}
npm.commands.info( [ "sizzle", "version" ], function( err, info ) {
if ( err ) {
throw err;
}
callback( Object.keys( info )[ 0 ] );
});
});
}

/**
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@
],
"dependencies": {},
"devDependencies": {
"colors": "^0.6.2",
"colors": "0.6.2",
"commitplease": "1.9.0",
"grunt": "0.4.2",
"grunt-bowercopy": "1.1.0",
"grunt-cli": "0.1.13",
"grunt-compare-size": "0.4.0",
"grunt-contrib-jshint": "0.8.0",
Expand All @@ -42,9 +41,14 @@
"grunt-git-authors": "1.2.0",
"grunt-jscs-checker": "0.4.1",
"grunt-jsonlint": "1.0.4",
"grunt-npmcopy": "0.1.0",
"gzip-js": "0.3.2",
"load-grunt-tasks": "0.3.0",
"requirejs": "2.1.10",
"npm": "1.4.21",
"qunitjs": "1.14.0",
"requirejs": "2.1.14",
"sinon": "1.10.3",
"sizzle": "2.0.0",
"testswarm": "1.1.0"
},
"scripts": {
Expand Down

0 comments on commit 79c0732

Please sign in to comment.