aboutsummaryrefslogtreecommitdiffstats
path: root/build
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 10:29:17 -0700
commit79c0732ac26253feb6070de409e3643607a5a4c4 (patch)
tree6e40d33eca23c679bcc5e0ebf0b0eeb1400129ae /build
parente38a94a61ce92bedf3bed916a042c18a3b5ce4ed (diff)
downloadjquery-79c0732ac26253feb6070de409e3643607a5a4c4.tar.gz
jquery-79c0732ac26253feb6070de409e3643607a5a4c4.zip
Build: drop bower; use npm for front-end deps
Fixes #15186 Closes gh-1620 Conflicts: bower.json
Diffstat (limited to 'build')
-rw-r--r--build/ensure-sizzle.js19
1 files changed, 15 insertions, 4 deletions
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 ] );
+ });
+ });
}
/**