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 09:02:59 -0700
commite1949f43711b5808d42378bafb6728b40b1738d6 (patch)
tree5ae1d27358a04474273119878d008e01ac8d514d /build
parente5190982c40d7ac8ab9bdb2e7e4334f0e123ef66 (diff)
downloadjquery-e1949f43711b5808d42378bafb6728b40b1738d6.tar.gz
jquery-e1949f43711b5808d42378bafb6728b40b1738d6.zip
Build: drop bower; use npm for front-end deps
Fixes #15186 Closes gh-1620
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 ] );
+ });
+ });
}
/**