zkat / npx

execute npm package binaries (moved)
https://github.com/npm/npx
Other
2.63k stars 105 forks source link

Accessing contents of a binary package #218

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hi,

I'm building a CLI-tool that, when executed, executes a plop package binary dependency. I'm also providing arguments for plop, one of which is a config file within the CLI-tool package.

I'm using __dirname to compose the absolute path to the config file, but npx resolves this to a path which doesn't exist: /Users/░░░░░░/.npm/_npx/1807/lib/node_modules/░░░░░░/plopfile.js.

Is there a way to point to contents of a binary package?

I'm using node 11.6.0 and npm 6.5.0-next.0

Cheers