diff options
author | Rebecca Turner <me@re-becca.org> | 2015-06-17 10:31:42 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2015-06-26 03:27:25 +0300 |
commit | dc806db53342d3bb52887f09daeebf291ba412d4 (patch) | |
tree | ffe4569bda875e6721f167379bbaca73164907a4 /lib/install.js | |
parent | e5606064f4acbe3a44e43637b3ba430430755032 (diff) |
install: Add initial npm@3 support for install --link
See FIXME in install for details on how this will need to be reworked.
Diffstat (limited to 'lib/install.js')
-rw-r--r-- | lib/install.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/install.js b/lib/install.js index 8d18d8dc5..214612b7f 100644 --- a/lib/install.js +++ b/lib/install.js @@ -363,6 +363,25 @@ Installer.prototype.generateActionsToTake = function (cb) { ], cb) } + +/* +FIXME: npm install --link [list of stuff] + Skip all of this and directly do the install -g / link steps +FIXME: npm install --link [no args or .] + need to detect a list of top level modules that are going to be installed + check them for elegibility for linking, if so, take them and any of their + deps off the regular install list and install and link them + eg: + diff + if not linking, skip all the below: + for each action... + if add/update not top level or is not linkable, keep + else add to actions to link-todo-list, remove from pkg + if nothing in link-todo-list, skip the below: + reprune (will avoid installing any subdeps of the now global things) + diff again, add link-todo-list to result +*/ + Installer.prototype.executeActions = function (cb) { validate('F', arguments) log.silly('install', 'executeActions') @@ -387,6 +406,8 @@ Installer.prototype.executeActions = function (cb) { [doSerialActions, 'move', staging, todo, cg.newGroup('move')], [doSerialActions, 'finalize', staging, todo, cg.newGroup('finalize')], [doSerialActions, 'build', staging, todo, trackLifecycle.newGroup('build')], + [doSerialActions, 'global-install', staging, todo, trackLifecycle.newGroup('global-install')], + [doSerialActions, 'global-link', staging, todo, trackLifecycle.newGroup('global-link')], [doParallelActions, 'update-linked', staging, todo, trackLifecycle.newGroup('update-linked')], [doSerialActions, 'install', staging, todo, trackLifecycle.newGroup('install')], [doSerialActions, 'postinstall', staging, todo, trackLifecycle.newGroup('postinstall')]) |