grunt-write-bower-json
v0.0.1
Published
Generates a bower.json file
Downloads
36
Readme
grunt-write-bower-json
Overview
This is a simple little grunt task for dynamically generating a bower.json file
using a JSON template which can interpolate <%= %>
tags with any value in your
grunt config using grunt.template.process
With a configuration like this:
writeBowerJson: {
options: {
bowerJsonTemplate: 'config/bower-template.json'
}
}
You can define a file in config/bower-template.json
{
"name": "<%= pkg.name %>",
"version": "<%= pkg.version %>",
"main": "dist/<%= files.js.uncompressedDist %>",
"ignore": [
"app",
"config",
"spec",
"tasks",
".travis.yml",
"Gruntfile.js",
"main.js",
"package.json"
],
"dependencies": {
},
"devDependencies": {
}
}
And running grunt writeBowerJson
should output like this:
Running "writeBowerJson" task
Wrote `bower.json` from template `config/bower-template.json`
Done, without errors.
Running Specs
- clone this repo
npm install
grunt spec