Skip to content

Publishing projects

Meir Noordermeer edited this page Jul 18, 2017 · 2 revisions

Using ap-npm to set your config

Running: ap-npm init in your project folder (run this after running npm init) will add the hostname from your global config as the publishConfig-registry to your project.

Manual config

Publishing projects to ap-npm can be done using the following command:

npm publish --registry=http(s)://hostname:port`

We recommended to add this line to your package.json of your project:

"publishConfig": {
    "registry": http(s)://hostname:port
}

This automatically sets the registry to your ap-npm instance when running npm publish and prevents accidentally publishing your project to https://registry.npmjs.org/

Clone this wiki locally