Specifying 'publishConfig' in package.json
See original GitHub issueUse case: Building AWS CDK JSII construct and publishing to company internal Artifactory repository.
It would be good to have a possibility to specify this in package.json
:
"publishConfig": {
"registry": "https://company.com/api/npm/company-local/"
},
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:6 (5 by maintainers)
Top Results From Across the Web
package.json - npm Docs
Description. This document is all you need to know about what's required in your package.json file. It must be actual JSON, not just...
Read more >NPM: how to specify registry to publish in the command line?
configure your package.json with a publish config: { ... "publishConfig": { "registry": "http://nexus.dsv.myhost/nexus/repository/npmjs" }, ...
Read more >Using Github Package Registry : Publish NPM Packages
Using publishConfig in package.json. Edit the package.json file for your package and include a publishConfig entry. "publishConfig": { "registry ...
Read more >Creating NPM Packages - BJ Anderson
So, I'll start by setting up a private npm repo on my computer, and then, ... I recommend adding the publishConfig setting to...
Read more >npm packages in the Package Registry - GitLab Docs
npmrc file and by using the publishConfig option in the package.json . The value used for the @scope is the root of the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Wanted to leave a note (based on convo in cdk.dev Slack). This is achievable (though not “native”) currently. You can do something like:
You’ll have to also add an environment variable for the NPM registry. It’s easy in codebuild. For GitHub you’ll have to do something with the actions
I use this for working with AWS CodeCommit. Also tested (but I don’t have an example) with GitHub. Sources / examples:
In our environments, the developers are instructed to configure their
.npmrc
with something like thisregistry = https://companyartifactory.com/api/npm/company-npm-general
.The build environment we are using has a set of NPM credentials that would allow publishing to the internal repository as long as the
publishConfig
property would be in place.