Skip to content
Meir Noordermeer edited this page May 2, 2017 · 5 revisions

Commands

  Usage: ap-npm [options] [command]


  Commands:

    serve|s [options]   serve ap-npm
    set <prop> <value>  sets default config property
    init                init a npm project using ap-npm config

  Options:

    -h, --help  output usage information

(Note: above options can also be set in /src/config.js)

To publish a package:
npm publish --registry=http://hostname:port`

Note:

npm publish @myco/myPackage

won't work as it will try to publish the package to https://registry.npmjs.org/

To install a package:
npm install @myco/myPackage
To login:
npm login --registry=http://hostname:port --scope=@myco

Note: npm login is an alias for npm adduser

To logout:
npm logout --scope=@myco
Set registry:
npm config set @myco:registry http://reg.example.com
Set dependencies:
"dependencies": {
   "@myorg/mypackage": "^1.3.0"
 }
Importing scoped packages:
require('@myorg/mypackage')
Clone this wiki locally