libnpmexec
npm exec (npx) programmatic API
Last updated a year ago by lukekarrys .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ npm install libnpmexec 
SYNC missed versions from official npm registry.

libnpmexec

npm version license CI - libnpmexec

The npm exec (npx) Programmatic API

Install

npm install libnpmexec

Usage:

const libexec = require('libnpmexec')
await libexec({
  args: ['yosay', 'Bom dia!'],
  cache: '~/.npm/_cacache',
  npxCache: '~/.npm/_npx',
  yes: true,
})

API:

libexec(opts)

  • opts:
    • args: List of pkgs to execute Array<String>, defaults to []
    • call: An alternative command to run when using packages option String, defaults to empty string.
    • cache: The path location to where the npm cache folder is placed String
    • npxCache: The path location to where the npx cache folder is placed String
    • chalk: Chalk instance to use for colors? Required
    • localBin: Location to the node_modules/.bin folder of the local project to start scanning for bin files String, defaults to ./node_modules/.bin. libexec will walk up the directory structure looking for node_modules/.bin folders in parent folders that might satisfy the current arg and will use that bin if found.
    • locationMsg: Overrides "at location" message when entering interactive mode String
    • globalBin: Location to the global space bin folder, same as: $(npm bin -g) String, defaults to empty string.
    • packages: A list of packages to be used (possibly fetch from the registry) Array<String>, defaults to []
    • path: Location to where to read local project info (package.json) String, defaults to .
    • runPath: Location to where to execute the script String, defaults to .
    • scriptShell: Default shell to be used String, defaults to sh on POSIX systems, process.env.ComSpec OR cmd on Windows
    • yes: Should skip download confirmation prompt when fetching missing packages from the registry? Boolean
    • registry, cache, and more options that are forwarded to @npmcli/arborist and pacote Object

LICENSE

ISC

Current Tags

  • 6.0.5                                ...           backport (10 months ago)
  • 9.0.0                                ...           latest (3 months ago)
  • 10.0.0-pre.1                                ...           prerelease (19 days ago)

77 Versions

  • 10.0.0-pre.1                                ...           19 days ago
  • 10.0.0-pre.0                                ...           a month ago
  • 9.0.0                                ...           3 months ago
  • 8.1.4                                ...           4 months ago
  • 8.1.3                                ...           5 months ago
  • 8.1.2                                ...           7 months ago
  • 8.1.1                                ...           7 months ago
  • 8.1.0                                ...           8 months ago
  • 8.0.0                                ...           8 months ago
  • 7.0.10                                ...           8 months ago
  • 7.0.9                                ...           9 months ago
  • 7.0.8                                ...           10 months ago
  • 6.0.5                                ...           10 months ago
  • 7.0.7                                ...           a year ago
  • 7.0.6                                ...           a year ago
  • 7.0.5                                ...           a year ago
  • 7.0.4                                ...           a year ago
  • 7.0.3                                ...           a year ago
  • 6.0.4                                ...           a year ago
  • 7.0.2                                ...           a year ago
  • 7.0.1                                ...           a year ago
  • 7.0.0                                ...           a year ago
  • 7.0.0-pre.0                                ...           a year ago
  • 6.0.3                                ...           a year ago
  • 6.0.2                                ...           a year ago
  • 6.0.1                                ...           2 years ago
  • 6.0.0                                ...           2 years ago
  • 5.0.17                                ...           2 years ago
  • 5.0.16                                ...           2 years ago
  • 5.0.15                                ...           2 years ago
  • 5.0.14                                ...           2 years ago
  • 5.0.13                                ...           2 years ago
  • 5.0.12                                ...           2 years ago
  • 5.0.11                                ...           2 years ago
  • 5.0.10                                ...           2 years ago
  • 5.0.9                                ...           2 years ago
  • 5.0.8                                ...           2 years ago
  • 5.0.7                                ...           2 years ago
  • 5.0.6                                ...           2 years ago
  • 5.0.5                                ...           2 years ago
  • 5.0.4                                ...           2 years ago
  • 5.0.3                                ...           2 years ago
  • 4.0.14                                ...           2 years ago
  • 5.0.2                                ...           2 years ago
  • 5.0.1                                ...           2 years ago
  • 5.0.0                                ...           2 years ago
  • 5.0.0-pre.5                                ...           2 years ago
  • 5.0.0-pre.4                                ...           2 years ago
  • 5.0.0-pre.3                                ...           2 years ago
  • 5.0.0-pre.2                                ...           2 years ago
  • 5.0.0-pre.1                                ...           2 years ago
  • 4.0.13                                ...           2 years ago
  • 5.0.0-pre.0                                ...           2 years ago
  • 4.0.12                                ...           2 years ago
  • 4.0.11                                ...           2 years ago
  • 4.0.10                                ...           2 years ago
  • 4.0.9                                ...           2 years ago
  • 4.0.8                                ...           3 years ago
  • 4.0.7                                ...           3 years ago
  • 4.0.6                                ...           3 years ago
  • 4.0.5                                ...           3 years ago
  • 4.0.4                                ...           3 years ago
  • 4.0.3                                ...           3 years ago
  • 4.0.2                                ...           3 years ago
  • 4.0.1                                ...           3 years ago
  • 4.0.0                                ...           3 years ago
  • 3.0.3                                ...           3 years ago
  • 3.0.2                                ...           3 years ago
  • 3.0.1                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.0.1                                ...           3 years ago
  • 2.0.0                                ...           4 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Downloads
Total 2
Today 1
This Week 1
This Month 2
Last Day 0
Last Week 1
Last Month 0
Dependencies (11)
Dev Dependencies (8)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE