grunt-write-bower-json

0.0.1 • Public • Published

grunt-write-bower-json

Build Status

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

Readme

Keywords

none

Package Sidebar

Install

npm i grunt-write-bower-json

Weekly Downloads

5

Version

0.0.1

License

none

Last publish

Collaborators

  • dustin.tinney
  • mike.testdouble
  • searls