This repository has been archived by the owner on Jul 6, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(npx): create a new binary for standalone publishing
- Loading branch information
Showing
12 changed files
with
3,068 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/node_modules | ||
/.nyc_output | ||
/test/cache | ||
npx.1 | ||
libnpx.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
bin: bin/README.md bin/npx.1 bin/package.json bin/node_modules | ||
|
||
bin/README.md: README.md | ||
cp $< $@ | ||
|
||
bin/npx.1: libnpx.1 | ||
cat $< | sed s/libnpx/npx/ > $@ | ||
|
||
libnpx.1: README.md | ||
npm run docs | ||
|
||
bin/package.json: package.json bin/package.template.json | ||
cat bin/package.template.json | json -e "this.version = '$$(cat package.json | json version)'" > $@ | ||
json -I -f $@ -e "this.dependencies.libnpx = '^$$(cat $@ | json version)'" | ||
|
||
bin/node_modules: bin/package.json | ||
cd bin && npm i | ||
|
||
clean: | ||
rm -rf bin/README.md bin/npx.1 bin/package.json bin/node_modules bin/package-lock.json libnpx.1 | ||
|
||
.PHONY: clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/README.md | ||
/npx.1 | ||
/package.json | ||
/package-lock.json | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env node | ||
|
||
const npx = require('libnpx') | ||
const path = require('path') | ||
|
||
const NPM_PATH = path.join(__dirname, 'node_modules', '.bin', 'npm') | ||
|
||
npx(npx.parseArgs(process.argv, NPM_PATH)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "npx", | ||
"description": "execute npm package binaries", | ||
"main": "index.js", | ||
"bin": "index.js", | ||
"files": [ | ||
"./*.js", | ||
"./npx.1" | ||
], | ||
"keywords": [ | ||
"npm", | ||
"npm exec", | ||
"shell", | ||
"scripts", | ||
"npm bin", | ||
"cli" | ||
], | ||
"author": "Kat Marchán <kzm@sykosomatic.org>", | ||
"license": "CC0-1.0", | ||
"dependencies": { | ||
"npm": "^5.1.0", | ||
"libnpx": "" | ||
}, | ||
"bundleDependencies": [ | ||
"npm", | ||
"libnpx" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.