forked from hermo/npmi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
npmi.1
86 lines (83 loc) · 1.86 KB
/
npmi.1
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
.TH NPMI 1 "October 2017" "" ""
.SH NAME
npmi \- locally caching 'npm install'
.SH SYNOPSIS
.B npmi
.IR [OPTIONS]
.SH DESCRIPTION
.B npmi
installs NPM dependencies quickly from a local cache or a Redis server.
.PP
This is achieved by hashing a npm-shrinkwrap.json or package.json file
and storing a tarball containing all dependencies for a given project.
.PP
A hash contains the Node.js version used, the platform and a MD5 hash.
eg. v6.0.0-darwin-x64-ea8df7a03d7de2211f64096cbbff6db6.
.PP
A Redis server may also be used to share cached data between computers.
A shared cache may be useful when a team of developers are sharing
projects and need to update dependencies often.
.SH OPTIONS
.TP
.BR \-h
Display this help.
.TP
.BR \-c=\fIDIRECTORY\fR
Use specified cache dir.
Default is /tmp/npmi.
.TP
.BR \-e
Cache existing node_modules AKA 'Oops I forgot to npmi' mode.
.TP
.BR \-f
Force install from NPM and update cache.
.TP
.BR \-r=\fIREDIS_HOST\fR
Use specified Redis server for shared cache.
.TP
.BR \-t=\fIREDIS_TTL\fR
Specify Redis TTL in seconds. Default is 86400.
.TP
.BR \-v
Verbose output.
.SH ENVIRONMENT
.TP
.BR NPMI_CACHEDIR
Local cache directory. Default: $TMPDIR/npmi.
.TP
.BR NPMI_VERBOSE
Verbose output. Default: 0
.TP
.BR NPMI_FORCE
Force reinstall. Default: 0
.TP
.BR NPMI_CACHE_EXISTING
Cache whatever is currently in node_modules. Default: 0
.TP
.BR NPMI_REDIS_SERVER
Host/IP for Redis server. Default: "" (Don't use Redis)
.TP
.BR NPMI_REDIS_PORT
What port to use when connecting to Redis. Default: 6379
.TP
.BR NPMI_REDIS_TTL
How many seconds should modules be cached. Default: 86400 (24h)
.TP
.BR NPMI_REDIS_PREFIX
Key prefix for Redis. Default: "NPMI4"
.SH FILES
.I /etc/.npmirc
.RS
System wide configuration file.
.RE
.I $HOME/.npmirc
.RS
User specific configuration file.
.RE
.I .npmirc
.RS
Project specific configuration file.
.RE
See
.BR npmirc (5)
for further details.