citadel.nodes.npm module

class citadel.nodes.npm.Npm(yml, path)[source]
Synopsis:Runs the NPM executable.
Requirements:None
Platform:Any

Build

To run npm in a build directive, simply write the whole command line as you normally would. Example:

1
2
build:
  npm: compile run start --option=Value

No options are currently supported.

Deploy

param files:The files to publish.
type files:required
param registry:The registry to publish the packages to (defaults to npmjs.org).
type registry:optional
param scope:The scope to publish the packages under.
type scope:optional

Usage

1
2
3
4
5
6
7
deploy:
  npm:
    files:
      - some_file.tgz
      - some_directory/
    registry: https://artifactory.company.com/api/npm/jspackages
    scope: somenamespace

Publishes all the files present in the files directive with the provided parameters. It will simply loop over the files with all the given options. The deploy:npm directive translates into:

If scope includes a “@” as prefix (@scope) it will be silently ignored.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
npm \
    --registry https://artifactory.company.com/api/npm/jspackages \
    --scope somenamespace \
    publish \
    some_file.tgz

npm \
    --registry https://artifactory.company.com/api/npm/jspackages \
    --scope somenamespace \
    publish \
    some_directory
publish_pkg(directory, wildcard, registry=None, scope=None)[source]

Run npm publish.