How to create NPM scoped packages with git

Viewed 68

I would like to create scoped packages without paying for npm private registry. I have a private git repository (accessible with ssh) but there is no documentation on how to do this and with which syntax.

1 Answers

You have to run your own private registry. See for example: npm Registry for your organisation.

Then as described in the npm scope documentation

You can associate a scope with a registry at login, e.g.

npm login --registry=http://reg.example.com --scope=@myco

or

You can also associate a scope with a registry using npm config:

npm config set @myco:registry http://reg.example.com
Related