The default grunt task now installs bower components, thus saving one step in the developer docs

This commit is contained in:
Till Klocke 2015-08-06 18:33:20 +02:00 committed by Nils Schneider
parent d3cad446b4
commit dbccddbc22
3 changed files with 17 additions and 1 deletions

View file

@ -17,7 +17,7 @@ module.exports = function (grunt) {
grunt.loadTasks("tasks") grunt.loadTasks("tasks")
grunt.registerTask("default", ["lint", "saveRevision", "copy", "sass", "requirejs"]) grunt.registerTask("default", ["bower-install-simple", "lint", "saveRevision", "copy", "sass", "requirejs"])
grunt.registerTask("lint", ["eslint"]) grunt.registerTask("lint", ["eslint"])
grunt.registerTask("dev", ["default", "connect:server", "watch"]) grunt.registerTask("dev", ["default", "connect:server", "watch"])
} }

View file

@ -15,6 +15,7 @@
"grunt-contrib-uglify": "^0.5.1", "grunt-contrib-uglify": "^0.5.1",
"grunt-contrib-watch": "^0.6.1", "grunt-contrib-watch": "^0.6.1",
"grunt-eslint": "^10.0.0", "grunt-eslint": "^10.0.0",
"grunt-bower-install-simple": "^1.1.2",
"grunt-git-describe": "^2.3.2" "grunt-git-describe": "^2.3.2"
}, },
"eslintConfig": { "eslintConfig": {

View file

@ -1,5 +1,6 @@
module.exports = function(grunt) { module.exports = function(grunt) {
grunt.config.merge({ grunt.config.merge({
bowerdir: "bower_components",
copy: { copy: {
html: { html: {
options: { options: {
@ -74,6 +75,19 @@ module.exports = function(grunt) {
} }
} }
}, },
"bower-install-simple": {
options: {
directory: "<%=bowerdir%>",
color: true,
interactive: false,
production: true
},
"prod": {
options: {
production: true
}
}
},
requirejs: { requirejs: {
compile: { compile: {
options: { options: {
@ -89,6 +103,7 @@ module.exports = function(grunt) {
} }
}) })
grunt.loadNpmTasks("grunt-bower-install-simple")
grunt.loadNpmTasks("grunt-contrib-copy") grunt.loadNpmTasks("grunt-contrib-copy")
grunt.loadNpmTasks("grunt-contrib-requirejs") grunt.loadNpmTasks("grunt-contrib-requirejs")
grunt.loadNpmTasks("grunt-contrib-sass") grunt.loadNpmTasks("grunt-contrib-sass")