Skip to contentSkip to conversation

nodejs: Add npx to nodejs-npm package

PATCH In review Jonathan Liu 2 participants 2 messages Oct 12, 2017 – Oct 13, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nodejs: Add npx to nodejs-npm package

${bindir}/npx is a symbolic link to npm-cli.js in the npm module. This avoids the nodejs package depending on nodejs-npm.

---
 meta-oe/recipes-devtools/nodejs/nodejs_8.4.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-devtools/nodejs/nodejs_8.4.0.bb +1 -1
index 5c580fb72..5bcbc0007 100644
@@ -79,7 +79,7 @@ do_install_append_class-target() {
 }
 
 PACKAGES =+ "${PN}-npm"
-FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm"
+FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx"
 RDEPENDS_${PN}-npm = "bash python-shell python-datetime python-subprocess python-textutils"
 
 PACKAGES =+ "${PN}-systemtap"
Signature · 1 line
2.14.2
#1 lore raw
Quoted 13 lines · Jonathan Liu

${bindir}/npx is a symbolic link to npm-cli.js in the npm module. This avoids the nodejs package depending on nodejs-npm.

---
 meta-oe/recipes-devtools/nodejs/nodejs_8.4.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-devtools/nodejs/nodejs_8.4.0.bb +0 -0
index 5c580fb72..5bcbc0007 100644

meta-oe/recipes-devtools/nodejs/nodejs_8.4.0.bb do_install_append_class-target() { · line 82

Quoted 5 lines
meta-oe/recipes-devtools/nodejs/nodejs_8.4.0.bb +1 -1
@@ -79,7 +79,7 @@ do_install_append_class-target() {
 }
 
 PACKAGES =+ "${PN}-npm"
-FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm"
+FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx"

looks ok.

Quoted 6 lines
meta-oe/recipes-devtools/nodejs/nodejs_8.4.0.bb +0 -0
 RDEPENDS_${PN}-npm = "bash python-shell python-datetime python-subprocess python-textutils"
 
 PACKAGES =+ "${PN}-systemtap"
Signature · 1 line
2.14.2