Skip to content

bitrise-steplib/bitrise-step-save-npm-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Save NPM Cache

Step changelog

Saves node_modules dependencies, used by NPM and Yarn. This Step needs to be used in combination with Restore NPM Cache.

Description

Saves node_modules dependencies. This Step needs to be used in combination with Restore NPM Cache.

This Step is based on key-based caching and sets up the cache key and path automatically for NPM dependencies. If you'd like to change the cache key (or paths to cache), you might want to use the generic Save cache Step instead.

Note: NPM and Yarn package managers are both supported.

Related steps

Restore NPM cache

Save cache

🧩 Get started

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

You can also run this step directly with Bitrise CLI.

Examples

Minimal example

steps:
- restore-npm-cache@1: {}
- npm@1:
    inputs:
    - command: install
- save-npm-cache@1: {}

Check out Workflow Recipes for other caching examples!

⚙️ Configuration

Inputs
Key Description Flags Default
verbose Enable logging additional information for troubleshooting 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.

Note: this step's end-to-end tests (defined in e2e/bitrise.yml) are working with secrets which are intentionally not stored in this repo. External contributors won't be able to run those tests. Don't worry, if you open a PR with your contribution, we will help with running tests and make sure that they pass.

Learn more about developing steps: