@@ -6,7 +6,6 @@ description: API reference documentation for the generate license file library A
6
6
import TypeScriptToggle from " @site/src/components/TypeScriptToggle" ;
7
7
import LibraryMethod from " @site/src/components/docs/library/api/LibraryMethod" ;
8
8
import LibraryModel from " @site/src/components/docs/library/api/LibraryModel" ;
9
- import MethodSignature from " @site/src/components/docs/library/api/MethodSignature" ;
10
9
import MethodTags from " @site/src/components/docs/library/api/MethodTags" ;
11
10
12
11
<TypeScriptToggle />
@@ -32,9 +31,9 @@ import MethodTags from "@site/src/components/docs/library/api/MethodTags";
32
31
description: " A file path for the resulting license file" ,
33
32
},
34
33
{
35
- name: " lineEnding " ,
36
- type: ` "crlf" | "lf" ` ,
37
- description: ` Will use the system default if omitted ` ,
34
+ name: " options " ,
35
+ type: " GenerateLicenseFileOptions " ,
36
+ description: " Additional options for the license file generation " ,
38
37
isOptional: true ,
39
38
},
40
39
],
@@ -58,9 +57,9 @@ import MethodTags from "@site/src/components/docs/library/api/MethodTags";
58
57
description: " A file path for the resulting license file" ,
59
58
},
60
59
{
61
- name: " lineEnding " ,
62
- type: ` "crlf" | "lf" ` ,
63
- description: ` Will use the system default if omitted ` ,
60
+ name: " options " ,
61
+ type: " GenerateLicenseFileOptions " ,
62
+ description: " Additional options for the license file generation " ,
64
63
isOptional: true ,
65
64
},
66
65
],
@@ -91,9 +90,9 @@ import MethodTags from "@site/src/components/docs/library/api/MethodTags";
91
90
description: " A path to the package.json for the project" ,
92
91
},
93
92
{
94
- name: " lineEnding " ,
95
- type: ` "crlf" | "lf" ` ,
96
- description: ` Will use the system default if omitted ` ,
93
+ name: " options " ,
94
+ type: " GetLicenseFileTextOptions " ,
95
+ description: " Additional options for the license text generation " ,
97
96
isOptional: true ,
98
97
},
99
98
],
@@ -112,9 +111,9 @@ import MethodTags from "@site/src/components/docs/library/api/MethodTags";
112
111
description: " Paths to the package.jsons for the projects" ,
113
112
},
114
113
{
115
- name: " lineEnding " ,
116
- type: ` "crlf" | "lf" ` ,
117
- description: ` Will use the system default if omitted ` ,
114
+ name: " options " ,
115
+ type: " GetLicenseFileTextOptions " ,
116
+ description: " Additional options for the license text generation " ,
118
117
isOptional: true ,
119
118
},
120
119
],
@@ -144,6 +143,12 @@ import MethodTags from "@site/src/components/docs/library/api/MethodTags";
144
143
type: " string" ,
145
144
description: " A path to the package.json for the project" ,
146
145
},
146
+ {
147
+ name: " options" ,
148
+ type: " GetProjectLicensesOptions" ,
149
+ description: " Additional options for the license discovery" ,
150
+ isOptional: true ,
151
+ },
147
152
],
148
153
returnType: {
149
154
type: " Promise<ILicense[]>" ,
@@ -174,9 +179,113 @@ import MethodTags from "@site/src/components/docs/library/api/MethodTags";
174
179
<>
175
180
Contains the content of a given license and the list of dependencies it pertains to. It is
176
181
returned from{ " " }
177
- <a href = " #getProjectLicenses" >
182
+ <a href = " #getprojectlicenses-" >
183
+ <code >getProjectLicenses</code >
184
+ </a >
185
+ { " " } .
186
+ </>
187
+ }
188
+ />
189
+
190
+ ### GenerateLicenseFileOptions
191
+
192
+ <LibraryModel
193
+ properties = { [
194
+ {
195
+ name: " lineEnding" ,
196
+ type: ' "lf" | "crlf"' ,
197
+ description:
198
+ ' Specify the line ending to use in the generated license file: either "lf" or "crlf". Leave undefined to use the system default' ,
199
+ },
200
+ {
201
+ name: " replace" ,
202
+ type: " Record<string, string>" ,
203
+ description:
204
+ " A map of packages-to-file-paths containing content that should be used instead of the package's license content" ,
205
+ },
206
+ {
207
+ name: " exclude" ,
208
+ type: " string[]" ,
209
+ description: " Packages to exclude from the generated license file" ,
210
+ },
211
+ {
212
+ name: " append" ,
213
+ type: " string[]" ,
214
+ description: " File paths to read in and append to the bottom of the generated license file" ,
215
+ },
216
+ ]}
217
+ description = {
218
+ <>
219
+ Additional options for the license file generation. Can be optionally passed into{ " " }
220
+ <a href = " #generatelicensefile-" >
221
+ <code >generateLicenseFile</code >
222
+ </a >
223
+ { " " } .
224
+ </>
225
+ }
226
+ />
227
+
228
+ ### GetLicenseFileTextOptions
229
+
230
+ <LibraryModel
231
+ properties = { [
232
+ {
233
+ name: " lineEnding" ,
234
+ type: ' "lf" | "crlf"' ,
235
+ description:
236
+ ' Specify the line ending to use in the generated license file: either "lf" or "crlf". Leave undefined to use the system default' ,
237
+ },
238
+ {
239
+ name: " replace" ,
240
+ type: " Record<string, string>" ,
241
+ description:
242
+ " A map of packages-to-file-paths containing content that should be used instead of the package's license content" ,
243
+ },
244
+ {
245
+ name: " exclude" ,
246
+ type: " string[]" ,
247
+ description: " Packages to exclude from the generated license file" ,
248
+ },
249
+ {
250
+ name: " append" ,
251
+ type: " string[]" ,
252
+ description: " File paths to read in and append to the bottom of the generated license file" ,
253
+ },
254
+ ]}
255
+ description = {
256
+ <>
257
+ Additional options for the license text generation. Can be optionally passed into{ " " }
258
+ <a href = " #getlicensefiletext-" >
259
+ <code >getLicenseFileText</code >
260
+ </a >
261
+ { " " } .
262
+ </>
263
+ }
264
+ />
265
+
266
+ ### GetProjectLicensesOptions
267
+
268
+ <LibraryModel
269
+ properties = { [
270
+ {
271
+ name: " replace" ,
272
+ type: " Record<string, string>" ,
273
+ description:
274
+ " A map of packages-to-file-paths containing content that should be used instead of the package's license content" ,
275
+ },
276
+ {
277
+ name: " exclude" ,
278
+ type: " string[]" ,
279
+ description: " Packages to exclude from the generated license file" ,
280
+ },
281
+ ]}
282
+ description = {
283
+ <>
284
+ Additional options for the license discovery. Can be optionally passed into{ " " }
285
+ <a href = " #getprojectlicenses-" >
178
286
<code >getProjectLicenses</code >
179
287
</a >
288
+ { " " } .
180
289
</>
181
290
}
182
291
/>
0 commit comments