Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

Commit

Permalink
feat(libnpx): libify main npx codebase
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This version of npx can no longer be used as a
standalone binary. It will be available on the registry as `libnpx`,
and a separate project will take over the role of the main `npx` binary.
  • Loading branch information
zkat committed Jul 8, 2017
1 parent 86fabdc commit 643f58e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2,614 deletions.
9 changes: 2 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env node
'use strict'

const Buffer = require('safe-buffer').Buffer
Expand All @@ -12,12 +11,8 @@ const which = promisify(require('which'))

const PATH_SEP = process.platform === 'win32' ? ';' : ':'

if (require.main === module) {
main(parseArgs())
}

module.exports = main
function main (argv) {
module.exports = npx
function npx (argv) {
const shell = argv['shell-auto-fallback']
if (shell || shell === '') {
const fallback = require('./auto-fallback.js')(
Expand Down
Loading

0 comments on commit 643f58e

Please sign in to comment.