base-bower
v0.1.2
Published
Base plugin that adds methods for programmatically installing bower packages.
Downloads
12
Maintainers
Readme
base-bower
Base plugin that adds methods for programmatically installing bower packages.
Install
Install with npm:
$ npm install base-bower --save
Usage
var bower = require('base-bower');
var Base = require('base');
var app = new Base();
app.use(bower());
// install bower packages `bootstrap` and `moment`
app.bower.saveDev(['bootstrap', 'moment'], function(err) {
if (err) throw err;
});
API
.bower
Execute bower install
with the given args
, bower package names
and callback.
Params
args
{String|Array}names
{String|Array}cb
{Function}: Callback
Example
app.bower('--save', ['isobject'], function(err) {
if (err) throw err;
});
.bower.install
Execute bower install
with one or more bower package names
.
Params
names
{String|Array}cb
{Function}: Callback
Example
app.bower.install('bootstrap', function(err) {
if (err) throw err;
});
.bower.latest
(Re-)install and save the latest version of all dependencies
and devDependencies
currently listed in bower.json.
Params
cb
{Function}: Callback
Example
app.bower.latest(function(err) {
if (err) throw err;
});
.bower.save
Execute bower install --save
with one or more bower package names
. Updates dependencies
in bower.json.
Params
names
{String|Array}cb
{Function}: Callback
Example
app.bower.save('micromatch', function(err) {
if (err) throw err;
});
.bower.saveDev
Execute bower install --save-dev
with one or more bower package names
. Updates devDependencies
in bower.json.
Params
names
{String|Array}cb
{Function}: Callback
Example
app.bower.saveDev('isobject', function(err) {
if (err) throw err;
});
Related projects
You might also be interested in these projects:
- base-task: base plugin that provides a very thin wrapper around https://github.com/doowb/composer for adding task methods to… more | homepage
- base: base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… more | homepage
- spawn-commands: Launches a new process with the given command, with command line arguments in
args
. Should… more | homepage
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Building docs
Generate readme and API documentation with verb:
$ npm install verb && npm run docs
Or, if verb is installed globally:
$ verb
Running tests
Install dev dependencies:
$ npm install -d && npm test
Author
Jon Schlinkert
License
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v0.9.0, on April 13, 2016.