-
Notifications
You must be signed in to change notification settings - Fork 6
/
symlink.1
66 lines (64 loc) · 1.67 KB
/
symlink.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
.TH "SYMLINK" "1" "November 2015" "" ""
.SH "NAME"
\fBsymlink\fR
.P
Symlink \fBnode\fP repositories together as quickly as possible\.
.SH SYNOPSIS
.P
\fBsymlink [OPTION]\.\.\. repoDir\.\.\fP
.SH DESCRIPTION
.P
Links together all repositories using \fBnpm link\fP after having fetched the smallest amount of dependencies using \fBnpm install\fP\|\.
.P
Performs dependency analysis to ensure the least dependent modules are made available via \fBnpm link\fP first\.
.SH OPTIONS
.P
\fB\-g,\-\-global\fP Globally installed module to be linked
.P
\fB\-e,\-\-execute\fP Execute commands \- same as piping through \fBsh\fP
.SH EXAMPLES
.P
See how a set of repositories would be linked together
.P
\fBsymlink repos\fP
.P
Actually run the set of commands
.P
\fBsymlink repos | sh\fP
.P
Reuse large globally installed modules if you know what you are doing
.P
\fBsymlink repos \-g gulp\fP
.SH INSTALLATION
.P
Install globally through npm
.P
\fBnpm install \-g symlink\fP
.SH ALGORITHM
.P
There is an analysis step:
.RS 0
.IP \(bu 2
read \fBpackage\.json\fP of each module in the given directory/directories and collects \fBdependencies\fP + \fBdevDependencies\fP
.IP \(bu 2
finds the \fBlocal\fP ones (found in given directories)
.IP \(bu 2
finds the \fBexternal\fP ones (complement)
.IP \(bu 2
orders the modules by least inclusion
.RE
.P
Then the execution step for each module (by least inclusion):
.RS 0
.IP \(bu 2
\fBnpm link (localDeps) ∪ ((globals ∩ externalDeps))\fP
.IP \(bu 2
\fBnpm install (externalDeps ∖ globals)\fP
.IP \(bu 2
\fBnpm link\fP
.RE
.P
This ensures your repository directories are all linked together\.
.SH BUGS
.P
Please report bugs at \fIhttps://github\.com/clux/symlink/issues\fR