File: npm-cache.md

package info (click to toggle)
npm 1.4.21%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,084 kB
  • ctags: 509
  • sloc: sh: 639; makefile: 185
file content (30 lines) | stat: -rw-r--r-- 976 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
npm-cache(3) -- manage the npm cache programmatically
=====================================================

## SYNOPSIS

    npm.commands.cache([args], callback)

    // helpers
    npm.commands.cache.clean([args], callback)
    npm.commands.cache.add([args], callback)
    npm.commands.cache.read(name, version, forceBypass, callback)

## DESCRIPTION

This acts much the same ways as the npm-cache(1) command line
functionality.

The callback is called with the package.json data of the thing that is
eventually added to or read from the cache.

The top level `npm.commands.cache(...)` functionality is a public
interface, and like all commands on the `npm.commands` object, it will
match the command line behavior exactly.

However, the cache folder structure and the cache helper functions are
considered **internal** API surface, and as such, may change in future
releases of npm, potentially without warning or significant version
incrementation.

Use at your own risk.