Browse Source

bower + grunt

master
David Miller 11 years ago
parent
commit
c434adeaa3
  1. 11
      Gruntfile.js
  2. 9
      README.md
  3. 3
      package.json

11
Gruntfile.js

@ -118,6 +118,13 @@ module.exports = function(grunt) { @@ -118,6 +118,13 @@ module.exports = function(grunt) {
spawn: false,
}
},
},
bower: {
install: {
options: {
targetDir: './bower_components',
}
}
}
});
@ -128,8 +135,10 @@ module.exports = function(grunt) { @@ -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']);
};

9
README.md

@ -10,7 +10,12 @@ You can use the source files within this repo to customize the Agency theme. You @@ -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.*

3
package.json

@ -15,6 +15,7 @@ @@ -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"
}
}

Loading…
Cancel
Save