steps-npm

command module
v0.0.0-...-15f3332 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2022 License: MIT Imports: 17 Imported by: 0

README

Run npm command

Step changelog

The Step runs npm with the command and arguments you provide, for example, to install missing packages or run a package's test.

Description

You can install missing JS dependencies with this Step if you insert it before any build step and provide the install command. You can also test certain packages with the test command. You can do both in one Workflow, however, this requires one Run npm command Step for installation followed by another Run npm command Step for testing purposes.

Configuring the Step
  1. Add the Run npm command Step to your Workflow preceding any build Step.
  2. Set the Working directory.
  3. Set the command you want npm to execute, for example install to run npm install in the The npm command with arguments to run input.
  4. If you're looking for a particular npm version, you can set it in the Version of npm to use input.
  5. You can cache the content of the node modules directory if you select true in the drop-down. By default this input is set to false.
Troubleshooting

Make sure you insert the Step before any build Step so that every dependency is downloaded a build Step starts running.

🧩 Get started

Add this step directly to your workflow in the Bitrise Workflow Editor.

You can also run this step directly with Bitrise CLI.

⚙️ Configuration

Inputs
Key Description Flags Default
workdir Working directory of the step. You can leave it empty to not change it. $BITRISE_SOURCE_DIR
command Specify the command with arguments to run with npm. This input value will be append to the end of the npm command call. For example: - install -> npm install - install -g cordova -> npm install -g cordova required
npm_version Set this value to the version of npm that is required to run the command. Must be a valid semver string.
cache_local_deps Select if the contents of node_modules directory should be cached. true: Mark local dependencies to be cached. false: Do not use cache. required false
Outputs There are no outputs defined in this step

🙋 Contributing

We welcome pull requests and issues against this repository.

For pull requests, work on your changes in a forked repository and use the Bitrise CLI to run step tests locally.

Learn more about developing steps:

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL