Blaine
Blaine

Reputation: 1586

How do I set "Configuration" options for "npm pack" commands?

Doc page https://docs.npmjs.com/cli/v8/commands/npm-pack has very useful configuration options. Right now I want to use config "pack-destination" per https://docs.npmjs.com/cli/v8/commands/npm-pack#pack-destination, but they give no invocation examples and no hint about how to make these settings.

I have tried setting "pack-destination" in my active npmrc file, via command-line switch "--pack-destination=dirpath" (with both relative and absolute paths), argument "pack-destination=dirpath". The first two have no effect. Last seems to be how you set some tags.

Upvotes: 6

Views: 7027

Answers (1)

I'm not sure how exactly did you invoked the command-line, but I just used like this in my terminal with success:

npm pack --pack-destination="./dest"

relative path worked just fine

Upvotes: 11

Related Questions