-
Notifications
You must be signed in to change notification settings - Fork 12
/
pjson.d.ts
195 lines (162 loc) · 5.14 KB
/
pjson.d.ts
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
interface pjsonPerson {
name : string;
url : string;
email : string;
}
declare module "pjson" {
/**
* The name of the package.
*/
export var name : string;
/**
* Version must be parseable by node-semver, which is
* bundled with npm as a dependency.
*/
export var version : string;
/**
* This helps people discover your package, as it's
* listed in 'npm search'.
*/
export var description : string;
/**
* This helps people discover your package as it's
* listed in 'npm search'.
*/
export var keywords : string[];
/**
* The url to the project homepage.
*/
export var homepage : string;
/**
* The url to your project's issue tracker and / or the email
* address to which issues should be reported. These are
* helpful for people who encounter issues with your package.
*/
export var bugs : {
/**
* The url to your project's issue tracker.
*/
url : string;
/**
* The email address to which issues should be reported.
*/
email: string;
};
/**
* You should specify a license for your package so that
* people know how they are permitted to use it, and any
* restrictions you're placing on it.
*/
export var license : string;
/**
* A person who has been involved in creating or maintaining this package
*/
export var author : pjsonPerson;
/**
* A list of people who contributed to this package.
*/
export var contributors : pjsonPerson[];
/**
* A list of people who maintains this package.
*/
export var maintainers : pjsonPerson[];
/**
* The 'files' field is an array of files to include in your project.
* If you name a folder in the array, then it will also include
* the files inside that folder.
*/
export var files : string[];
/**
* The main field is a module ID that is the primary entry point to your program.
*/
export var main : string;
/**
* Names of binaries for this package
*/
export var bin : { [commandName: string]: string };
/**
* Specify either a single file or an array of filenames to put in place for the man program to find.
*/
export var man : string[];
/**
* Recognized directories for the package
*/
export var directories : {
/**
* If you specify a 'bin' directory, then all the files in that folder will be used as the 'bin' hash.
*/
bin: string;
/**
* Put markdown files in here. Eventually, these will be displayed nicely, maybe, someday.
*/
doc: string;
/**
* Put example scripts in here. Someday, it might be exposed in some clever way.
*/
example: string;
/**
* Tell people where the bulk of your library is. Nothing special
* is done with the lib folder in any way, but it's useful meta info.
*/
lib : string;
/**
* A folder that is full of man pages. Sugar to generate a 'man' array by walking the folder.
*/
man : string;
/**
* Test folder
*/
test : string
};
/**
* Specify the place where your code lives. This is helpful for people who want to contribute.
*/
export var repository : {
type : string;
url : string;
};
/**
* The 'scripts' member is an object hash of script commands that are run at various times in
* the lifecycle of your package. The key is the lifecycle event, and the value is
* the command to run at that point.
*/
export var scripts : { [name: string]: string };
/**
* A 'config' hash can be used to set configuration parameters used in
* package scripts that persist across upgrades.
*/
export var config : { [name: string]: any };
/**
* Dependencies are specified with a simple hash of package name to version range.
* The version range is a string which has one or more space-separated descriptors.
* Dependencies can also be identified with a tarball or git URL.
*/
export var dependencies : { [name: string]: any };
export var devDependencies : { [name: string]: any };
export var optionalDependencies : { [name: string]: any };
export var peerDependencies : { [name: string]: any };
/**
* Array of package names that will be bundled when publishing the package.
*/
export var bundleDependencies : string[];
export var engines : { [name: string]: string };
export var engineStrict : boolean;
export var os : string[];
export var cpu : string[];
/**
* If your package is primarily a command-line application
* that should be installed globally, then set this value to
* true to provide a warning if it is installed locally.
*/
export var preferGlobal : boolean;
/**
* If set to true, then npm will refuse to publish it.
*/
export var private : boolean;
export var publishConfig : { [name: string]: any };
export var dist : {
shasum : string;
tarball : string;
};
export var readme : string;
}