]> source.dussan.org Git - jquery.git/commitdiff
Build: drop bower; use npm for front-end deps
authorTimmy Willison <timmywillisn@gmail.com>
Thu, 17 Jul 2014 16:02:59 +0000 (09:02 -0700)
committerTimmy Willison <timmywillisn@gmail.com>
Thu, 17 Jul 2014 17:29:17 +0000 (10:29 -0700)
Fixes #15186
Closes gh-1620

Conflicts:
bower.json

.bowerrc [deleted file]
.gitignore
Gruntfile.js
bower.json
build/ensure-sizzle.js
package.json

diff --git a/.bowerrc b/.bowerrc
deleted file mode 100644 (file)
index baa91a3..0000000
--- a/.bowerrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "directory": "bower_components"
-}
\ No newline at end of file
index 7f4060a29128e45bf6bc6fddd9d531044ecf1e04..463dea426864dc850993402a7fea140736795a60 100644 (file)
@@ -9,5 +9,4 @@
 .sizecache.json
 
 /dist
-/bower_components
 /node_modules
index e43cfed0237d80f92a48304e87f8bd905482dd20..2461ba44fd2bbb04e5813bbfa256785554535e03 100644 (file)
@@ -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",
 
@@ -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
index 827734ccf41f3b4041d546a1d8318984f9cf54d9..e04ab62f3c2a34c657ae4b6004d369ec0e8b2475 100644 (file)
     "Gruntfile.js",
     "package.json"
   ],
-  "devDependencies": {
-    "sizzle": "1.11.1",
-    "requirejs": "2.1.10",
-    "qunit": "1.14.0",
-    "sinon": "1.8.1"
-  },
   "keywords": [
     "jquery",
     "javascript",
index 3686e697c2f8edc59500922f41655a4929610218..51921731ce6bbf565bd0fae9911c41845453362e 100644 (file)
@@ -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 ] );
+               });
+       });
 }
 
 /**
index 24b77aa68579276ba9bcdd8932465b989ff151cb..2baaf43d94c1d6eb5e27bd15eb9ed1a04383ae3b 100644 (file)
   ],
   "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",
     "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": {