Skip to content

Instantly share code, notes, and snippets.

@badsyntax
Created May 15, 2014 08:37
Show Gist options
  • Save badsyntax/17f9742387dfee0659e2 to your computer and use it in GitHub Desktop.
Save badsyntax/17f9742387dfee0659e2 to your computer and use it in GitHub Desktop.
Bower install does not use .bowerrc in cwd.
var bower = require('bower');
var path = require('path');
var cwd = path.resolve(__dirname, 'project');
bower.commands.install([], {}, {
cwd: cwd
})
.on('log', function(result) {
console.log(result.id, result.message);
})
.on('end', function(results) {
console.log('end', results);
})
.on('error', function(err) {
console.log('error', err);
});
{
"name": "bowertest",
"version": "0.0.0",
"description": "",
"main": "install.js",
"scripts": {},
"author": "",
"license": "ISC",
"dependencies": {
"bower": "~1.3.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment