summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKat Marchán <kzm@sykosomatic.org>2017-07-10 18:53:58 -0700
committerJames M Snell <jasnell@gmail.com>2017-07-17 08:49:10 -0700
commit62779ae195e190bee6fb8ef1c1d495ae3e8f7949 (patch)
tree7fc759e4bd161baa089c3b3b8212ed6df32a4ad4 /tools
parent24f43903b4a2f5aa73a99e6f3d4cc62d559cf94b (diff)
downloadandroid-node-v8-62779ae195e190bee6fb8ef1c1d495ae3e8f7949.tar.gz
android-node-v8-62779ae195e190bee6fb8ef1c1d495ae3e8f7949.tar.bz2
android-node-v8-62779ae195e190bee6fb8ef1c1d495ae3e8f7949.zip
build: add npx to installers
PR-URL: https://github.com/nodejs/node/pull/14235 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/install.py9
-rwxr-xr-xtools/msvs/msi/product.wxs10
-rw-r--r--tools/osx-pkg-postinstall.sh1
3 files changed, 20 insertions, 0 deletions
diff --git a/tools/install.py b/tools/install.py
index d51ac06d7b..afebb60e99 100755
--- a/tools/install.py
+++ b/tools/install.py
@@ -98,6 +98,15 @@ def npm_files(action):
else:
assert(0) # unhandled action type
+ # create/remove symlink
+ link_path = abspath(install_path, 'bin/npx')
+ if action == uninstall:
+ action([link_path], 'bin/npx')
+ elif action == install:
+ try_symlink('../lib/node_modules/npm/bin/npx-cli.js', link_path)
+ else:
+ assert(0) # unhandled action type
+
def subdir_files(path, dest, action):
ret = {}
for dirpath, dirnames, filenames in os.walk(path):
diff --git a/tools/msvs/msi/product.wxs b/tools/msvs/msi/product.wxs
index a21a3bb3ef..c8a89d7255 100755
--- a/tools/msvs/msi/product.wxs
+++ b/tools/msvs/msi/product.wxs
@@ -95,6 +95,8 @@
Description="!(loc.npm_Description)">
<ComponentRef Id="NpmCmdScript"/>
<ComponentRef Id="NpmBashScript"/>
+ <ComponentRef Id="NpxCmdScript"/>
+ <ComponentRef Id="NpxBashScript"/>
<ComponentRef Id="NpmConfigurationFile"/>
<ComponentRef Id="AppData" />
<ComponentGroupRef Id="NpmSourceFiles"/>
@@ -215,6 +217,14 @@
<File Id="npm.sh" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npm"/>
</Component>
+ <Component Id="NpxCmdScript">
+ <File Id="npx.cmd" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npx.cmd"/>
+ </Component>
+
+ <Component Id="NpxBashScript">
+ <File Id="npx.sh" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npx"/>
+ </Component>
+
<Directory Id="NodeModulesFolder" Name="node_modules">
<Directory Id="NpmFolder" Name="npm">
<Component Id="NpmConfigurationFile">
diff --git a/tools/osx-pkg-postinstall.sh b/tools/osx-pkg-postinstall.sh
index c4c872fc78..8212c27f8e 100644
--- a/tools/osx-pkg-postinstall.sh
+++ b/tools/osx-pkg-postinstall.sh
@@ -3,3 +3,4 @@
# TODO Can we extract $PREFIX from the installer?
cd /usr/local/bin
ln -sf ../lib/node_modules/npm/bin/npm-cli.js npm
+ln -sf ../lib/node_modules/npm/bin/npx-cli.js npx