You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

The NPM actions in Continua are a wrapper around the NPM command line. If you're having trouble using any of the NPM actions, please refer to the NPM Command Line Reference.

 

The NPM Install action is used to install NPM packages to the workspace 

Name

A friendly name for this action (will be displayed in the actions workflow area).

Enabled

Determines if this action will be run within the relevant stage.

Target Directory

Where to install the package. Relative paths will be anchored to the workspace folder.

Package Location Type

The type of package location. This can be a directory, file, URL or definition which describes the location of the package.

Package Folder

This input box is displayed if you choose Directory for the Package Location Type. Enter the path to the folder which contains the package.json file describing the installation.

Package File

This input box is displayed if you choose File for the Package Location Type. Enter the path to a gzipped tarball containing the NPM package to install.

Package URL

This input box is displayed if you choose Url for the Package Location Type. Enter the Url to a gzipped tarball or Git repository containing the NPM package to install. You can enter a http or https URL or one of the following special URL formats for accessing Git repositories.

  • <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:/]<path>[#<commit-ish>] where protocol is one of  git git+ssh git+http , or  git+https
  • <githubname>/<githubrepo>[#<commit-ish>] or github:<githubname>/<githubrepo>[#<commit-ish>] for installing packages from github.com repositories
  • gist:[<githubname>/]<gistID>[#<commit-ish>] for installing packages uploaded to gist.github.com
  • bitbucket:<bitbucketname>/<bitbucketrepo>[#<commit-ish>] for installing packages from bitbucket.org repositories
  • gitlab:<gitlabname>/<gitlabrepo>[#<commit-ish>] for installing packages from gitlab.com repositories

where <commit-ish> indicates a commit hash, branch or tag name. This defaults to master.

Package Definition

This input box is displayed if you choose Definition for the Package Location Type. Enter the name of a package that is published on the official npm registry. You can also optionally specify the scope, tag or version using the following formats:

  • [@<scope>/]<name>
  • [@<scope>/]<name>@<tag>
  • [@<scope>/]<name>@<version>
  • [@<scope>/]<name>@<version range>

You can also specify multiple package definitions separated with a space.

Save as dependency

Tick this to save the package name and version to your package dependencies

Dependancy Location

Where to save the package dependancy. Select "Save in dependencies", "Save in dev dependencies" or "Save in optional dependencies" to save under the dependencies, devDependencies or optionalDependencies node in the package.json file. 

Save exact

Tick this to save the dependency using the exact version rather than using npm's default semver range operator.

Options

 

Prefer tagged versions

Tick this to apply the --tag argument to all of the specified install targets. If a tag with the given name exists, the tagged version is preferred over newer versions

Force remote fetch

Tick this to use the --force argument to force NPM to fetch remote resources even if a local copy exists on disk

Install optional dependencies

Clear this to use --no-optional argument to prevent optional dependencies from being installed.

Ignore ShrinkWrap  file

Tick this to use the --no-shrinkwrap argument to ignore an available shrinkwrap file and use the package.json instead.

Log standard output

Tick this to log output from the NPM command line

Verbose logging

Tick this to pass the --verbose argument to get more detailed output from the NPM command line.

 

Environment Variables

Multiple environment variables can be defined - one per line. These are set before the NPM command line is run.

 

 

 

  • No labels