From 1109d82a8e8388284b6e2616f486090e61473692 Mon Sep 17 00:00:00 2001 From: Alex Van Camp Date: Tue, 1 Mar 2016 16:12:48 -0600 Subject: [PATCH] refactor(install): use system bower BREAKING CHANGE: requires bower to be globally installed --- lib/install-deps.js | 7 +------ package.json | 3 +-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/install-deps.js b/lib/install-deps.js index cd9e469..c770f70 100644 --- a/lib/install-deps.js +++ b/lib/install-deps.js @@ -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'); @@ -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']}); diff --git a/package.json b/package.json index 196a842..57bc53a 100644 --- a/package.json +++ b/package.json @@ -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"