aboutsummaryrefslogtreecommitdiffstats
path: root/Gruntfile.js
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2013-12-06 15:55:55 -0500
committerTimmy Willison <timmywillisn@gmail.com>2013-12-06 16:04:35 -0500
commitf9ad13c9ec8967916427642db2883a1bf3bccd86 (patch)
treead55994991cada6f447596609d763898eefd68a1 /Gruntfile.js
parented20e7c645064822f4070a0c60195e4bcdaba683 (diff)
downloadjquery-f9ad13c9ec8967916427642db2883a1bf3bccd86.tar.gz
jquery-f9ad13c9ec8967916427642db2883a1bf3bccd86.zip
Manage bower dependencies with grunt-bowercopy
Tracked bower dependencies are located at "src/sizzle" and "test/libs". The source-destination mapping is in the Gruntfile. When updating a bower dependency, update the version in bower.json, run `grunt bower`, and then commit the result. When adding a dependency, update the bowercopy task accordingly. Fixes #14615. Closes gh-1452.
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js27
1 files changed, 19 insertions, 8 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index c1973105a..4030a3e65 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -10,7 +10,6 @@ module.exports = function( grunt ) {
}
var gzip = require( "gzip-js" ),
- path = require( "path" ),
srcHintOptions = readOptionalJSON( "src/.jshintrc" );
// The concatenated file won't pass onevar
@@ -47,14 +46,23 @@ module.exports = function( grunt ) {
}
}
},
- bower: {
- install: {
+ bowercopy: {
+ options: {
+ clean: true
+ },
+ src: {
+ files: {
+ "src/sizzle": "sizzle"
+ }
+ },
+ tests: {
options: {
- targetDir: "bower_modules",
- cleanup: true,
- layout: function( type ) {
- return path.join( type );
- }
+ destPrefix: "test/libs"
+ },
+ files: {
+ "qunit": "qunit/qunit",
+ "require.js": "requirejs/require.js",
+ "sinon/fake_timers.js": "sinon/lib/sinon/util/fake_timers.js"
}
}
},
@@ -139,6 +147,9 @@ module.exports = function( grunt ) {
// Integrate jQuery specific tasks
grunt.loadTasks( "build/tasks" );
+ // Alias bower to bowercopy
+ grunt.registerTask( "bower", "bowercopy" );
+
// Short list as a high frequency watch task
grunt.registerTask( "dev", [ "build:*:*", "jshint", "jscs" ] );