Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 1.41 KB

rn-key-cache-dependencies.md

File metadata and controls

29 lines (20 loc) · 1.41 KB

(React Native) Cache NPM dependencies (Beta)

Description

Cache the contents of the node_modules folder with the new key-based caching Steps, Save Cache and Restore Cache.

Instructions

  1. Add the Restore NPM Cache Step to the Workflow.
  2. Add either the Run yarn command Step or the Run npm command Step based on your project setup. Set the input variables:
    • Set the The yarn command to run or The npm command with arguments to run input to install.
  3. Add the Save NPM Cache Step.

Fine tune cache behaviour

The NPM specific cache steps use optimal cache key and path configurations maintained by Bitrise. If you want full control over what should be cached then please check out the generic Restore Cache and Save Cache Steps.

You can always check out what key and path settings the NPM cache step uses: Github code snippet

bitrise.yml

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