From c434adeaa3a91feb48cc1e81daccaddcb6ac2411 Mon Sep 17 00:00:00 2001 From: David Miller Date: Wed, 17 Sep 2014 01:47:09 -0400 Subject: [PATCH] bower + grunt --- Gruntfile.js | 11 ++++++++++- README.md | 9 +++++++-- package.json | 3 ++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 2ca13c0..c729179 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -118,6 +118,13 @@ module.exports = function(grunt) { spawn: false, } }, + }, + bower: { + install: { + options: { + targetDir: './bower_components', + } + } } }); @@ -128,8 +135,10 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-banner'); grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-bower-task'); // Default task(s). - grunt.registerTask('default', ['concat', 'uglify', 'copy', 'less', 'usebanner']); + grunt.registerTask('default', ['concat', 'uglify', 'copy', 'less', 'usebanner', 'bower']); + grunt.registerTask('build', ['concat', 'uglify', 'copy', 'less', 'usebanner']); }; diff --git a/README.md b/README.md index d932444..3e2c049 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,12 @@ You can use the source files within this repo to customize the Agency theme. You - First, clone the repository. - Run `npm install` in the root directory to install all of the Grunt dependencies. -- Run `bower install` in the root directory to install all of the required Bower components. -- After all of the node modules and bower components are installed, you can either edit files and then run `grunt` to build the new dist folder, or you can run `grunt watch` which will tell Grunt to watch specified files for changes, and update the files in the dist folder automatically. Make sure to check out the Gruntfile and change it around as needed if you're adding more components to your project. +- After all of the node modules are installed, you will want to run the `grunt` command to make sure it's working and to install the required Bower components. + +## Grunt Tasks + +- `grunt` will run all Grunt tasks. It will build the dist folder and it will install Bower components. +- `grunt watch` will watch specified files for changes, and automatically build them within the dist folder. +- `grunt build` will build the dist folder, but will not install Bower components. *Note: You will need to have Node Package Manager (npm) and Grunt installed in order to perform the tasks outlined above.* \ No newline at end of file diff --git a/package.json b/package.json index c188e9c..cd1a4d7 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "grunt-contrib-watch": "~0.6.1", "grunt-banner": "~0.2.3", "grunt-contrib-concat": "~0.5.0", - "grunt-contrib-uglify": "~0.5.1" + "grunt-contrib-uglify": "~0.5.1", + "grunt-bower-task": "~0.4.0" } }