aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2014-07-17 09:02:59 -0700
committerTimmy Willison <timmywillisn@gmail.com>2014-07-17 09:02:59 -0700
commite1949f43711b5808d42378bafb6728b40b1738d6 (patch)
tree5ae1d27358a04474273119878d008e01ac8d514d
parente5190982c40d7ac8ab9bdb2e7e4334f0e123ef66 (diff)
downloadjquery-e1949f43711b5808d42378bafb6728b40b1738d6.tar.gz
jquery-e1949f43711b5808d42378bafb6728b40b1738d6.zip
Build: drop bower; use npm for front-end deps
Fixes #15186 Closes gh-1620
-rw-r--r--.bowerrc3
-rw-r--r--.gitignore1
-rw-r--r--Gruntfile.js10
-rw-r--r--bower.json6
-rw-r--r--build/ensure-sizzle.js19
-rw-r--r--package.json10
6 files changed, 26 insertions, 23 deletions
diff --git a/.bowerrc b/.bowerrc
deleted file mode 100644
index baa91a3e3..000000000
--- a/.bowerrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "directory": "bower_components"
-} \ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 7f4060a29..463dea426 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,5 +9,4 @@
.sizecache.json
/dist
-/bower_components
/node_modules
diff --git a/Gruntfile.js b/Gruntfile.js
index 98a0ac2ea..1daa03a3d 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -46,19 +46,18 @@ module.exports = function( grunt ) {
}
}
},
- bowercopy: {
+ npmcopy: {
all: {
options: {
- clean: true,
destPrefix: "external"
},
files: {
"sizzle/dist": "sizzle/dist",
"sizzle/LICENSE.txt": "sizzle/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",
@@ -138,7 +137,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
diff --git a/bower.json b/bower.json
index 9873e194e..92b168529 100644
--- a/bower.json
+++ b/bower.json
@@ -13,12 +13,6 @@
"Gruntfile.js",
"package.json"
],
- "devDependencies": {
- "sizzle": "2.0.0",
- "requirejs": "2.1.10",
- "qunit": "1.14.0",
- "sinon": "1.8.1"
- },
"keywords": [
"jquery",
"javascript",
diff --git a/build/ensure-sizzle.js b/build/ensure-sizzle.js
index 3686e697c..51921731c 100644
--- a/build/ensure-sizzle.js
+++ b/build/ensure-sizzle.js
@@ -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 ] );
+ });
+ });
}
/**
diff --git a/package.json b/package.json
index d6e90e50c..83d444cd7 100644
--- a/package.json
+++ b/package.json
@@ -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",
@@ -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": {