feat: add custom npm registry when installing dependencies#994
feat: add custom npm registry when installing dependencies#994antongolub merged 2 commits intogoogle:mainfrom
Conversation
|
@antongolub you can start the review:) |
fc665c3 to
e9d53d2
Compare
src/cli.ts
Outdated
| --eval=<js>, -e evaluate script | ||
| --ext=<.mjs> default extension | ||
| --install, -i install dependencies | ||
| --install-registry<path> install install dependencies via custom npm registry URL |
There was a problem hiding this comment.
--install-registry= install registry URL
src/cli.ts
Outdated
| const deps = parseDeps(await fs.readFile(filepath)) | ||
| await installDeps(deps, dir) | ||
| } | ||
|
|
There was a problem hiding this comment.
Let's just modify the current flow:
if (argv.install) {
const deps = parseDeps(await fs.readFile(filepath))
await installDeps(deps, dir, argv['install-registry'])
}There was a problem hiding this comment.
Are you suggesting to make such a flow? Maybe then replace --install-registry with --registry as in npm?
zx --install --registry='https://npm-proxy.example.com' script.mjscb1df6c to
a13f2c2
Compare
src/cli.ts
Outdated
| --eval=<js>, -e evaluate script | ||
| --ext=<.mjs> default extension | ||
| --install, -i install dependencies | ||
| --registry=<npm registry URL> custom npm registry URL dependencies works with install flag |
There was a problem hiding this comment.
I'd suggest:
--registry=<URL> npm registry, defaults to https://registry.npmjs.org/
Update also man/zx.1
There was a problem hiding this comment.
Cool suggest!
I update man/zx.1 and description for cli
antongolub
left a comment
There was a problem hiding this comment.
One more suggestion.
src/cli.ts
Outdated
| --help, -h print help | ||
| --repl start repl | ||
| --experimental enables experimental features (deprecated) | ||
| --quiet suppress any outputs |
There was a problem hiding this comment.
Now we can keep the formatting here for git blame.
There was a problem hiding this comment.
Thanks to your suggestion. Revert formatting
cc3fca1 to
0aca5e8
Compare
antongolub
left a comment
There was a problem hiding this comment.
Seems fine. Thanks for the improvement!
Description
Add custom npm registry with composition install and registry flags.
Fixes #972