Skip to content

Commit

Permalink
refactor(install): use system bower
Browse files Browse the repository at this point in the history
BREAKING CHANGE: requires bower to be globally installed
  • Loading branch information
Alex Van Camp committed Mar 1, 2016
1 parent 8c483a3 commit 1109d82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 1 addition & 6 deletions lib/install-deps.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var fs = require('fs');
var path = require('path');
var format = require('util').format;
var chalk = require('chalk');
var os = require('os');
Expand Down Expand Up @@ -42,11 +41,7 @@ module.exports = function (bundlePath, installDev) {
}

if (fs.existsSync(bundlePath + '/bower.json')) {
// rofl
// Amazing hack to synchronously install bower components without having to rely on
// `bower` being in the users' PATH.
var bowerPath = path.resolve(__dirname, '../node_modules/bower/bin/bower');
cmdline = format('node "%s" install %s', bowerPath, installDev ? '' : '--production');
cmdline = format('bower install %s', installDev ? '' : '--production');
process.stdout.write(format('Installing bower dependencies (dev: %s)... ', installDev));
try {
execSync(cmdline, {cwd: bundlePath, stdio: ['pipe', 'pipe', 'pipe']});
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@
},
"preferGlobal": true,
"dependencies": {
"bower": "^1.3.12",
"chalk": "^0.5.1",
"commander": "^2.6.0",
"inquirer": "^0.11.4",
"json-schema-defaults": "^0.1.1",
"npm-package-arg": "^4.1.0",
"npm-package-arg": "^3.0.0",
"request": "^2.51.0",
"rimraf": "^2.2.8",
"semver": "^4.2.0"
Expand Down

0 comments on commit 1109d82

Please sign in to comment.