Skip to content

Commit 76715ac

Browse files
committed
Merge pull request #9 from OpenframeProject/plugins-global
Install extensions as global npm packages
2 parents 41001a4 + f697593 commit 76715ac

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/frame.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ var jsonfile = require('jsonfile'),
99

1010
frame.state = {};
1111

12+
/**
13+
* Load the current frate state from disk.
14+
* @return {Promise}
15+
*/
1216
frame.load = function() {
1317
debug('load');
1418
return new Promise(function(resolve, reject) {

src/plugin-manager.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ pm.initPlugins = function(plugins, ofPluginApi) {
101101
*
102102
* Uses machine's npm as a child_process so that we don't have to depend on the npm package.
103103
*
104-
* TODO: don't re-install plugins that are already present
105-
*
106104
* @private
107105
*
108106
* @param {String} package_name NPM package name
@@ -112,7 +110,7 @@ pm.initPlugins = function(plugins, ofPluginApi) {
112110
*/
113111
function _installPlugin(package_name, version, force) {
114112
debug('installPlugin', package_name, version);
115-
var cmd = 'npm install ' + package_name;
113+
var cmd = 'npm install -g ' + package_name;
116114
if (version) {
117115
cmd += '@'+version;
118116
}
@@ -173,7 +171,7 @@ pm.uninstallPlugin = _removePlugin;
173171
*/
174172
function _checkPlugin(package_name, version) {
175173
debug('checkPlugin', package_name, version);
176-
var cmd = 'npm list ' + package_name;
174+
var cmd = 'npm list -g ' + package_name;
177175
if (version) {
178176
cmd += '@'+version;
179177
}

0 commit comments

Comments
 (0)