Socket
Socket
Sign inDemoInstall

n-cache-r

Package Overview
Dependencies
127
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    n-cache-r

Node Cashe Restore: Install packages with cached node_modules in Google Cloud Storage or locally and restore them on next builds when dependencies have not changed to reduce build time.


Version published
Maintainers
1
Install size
6.99 MB
Created

Readme

Source

n-cache-r (Node Cache Restore)

Cache folders node_modules in Google Cloud Storage and restore them on next builds.

Install

You can find this package on npm.

npm install n-cache-r

Example usage

Node

const {
  installPackage,
} = require("n-cache-r");

installPackage({
    bucketName: 'my-project-build-cache',
    storageOptions: {
        keyFilename: path.resolve(__dirname, '../service-account.json'),
    },
});

CLI

Usage: n-cache-r [options] [command]

Options:
  -h, --help         display help for command

Commands:
  install [options]  Fetch node_modules from cloud storage bucket before installing the package.
  help [command]     display help for command


Usage: n-cache-r install [options]

Fetch node_modules from cloud storage bucket before installing the package.

Options:
  --bucket <name>      Name of google cloud storage bucket. Used as cache location.
  --cwd [cwd]          Current working directory.
  --key <keyFilename>  Path to key file with service account for Google cloud storage.
  --no-cache           Do not use cache bucket.
  --cmd [cmd]          Command to create node_modules folder. (default: "npm ci")
  -h, --help           display help for command.

Keywords

FAQs

Last updated on 20 Nov 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc