@electron-forge/maker-base 6.0.0-beta.7 → 6.0.0-beta.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Maker.d.ts +31 -7
- package/dist/Maker.js +99 -111
- package/package.json +9 -10
- package/doc/assets/css/main.css +0 -865
- package/doc/assets/css/main.css.map +0 -7
- package/doc/assets/images/icons.png +0 -0
- package/doc/assets/images/icons@2x.png +0 -0
- package/doc/assets/images/widgets.png +0 -0
- package/doc/assets/images/widgets@2x.png +0 -0
- package/doc/assets/js/main.js +0 -5
- package/doc/assets/js/search.js +0 -3
- package/doc/classes/maker.html +0 -484
- package/doc/globals.html +0 -168
- package/doc/index.html +0 -237
- package/doc/interfaces/makeroptions.html +0 -315
- package/src/Maker.ts +0 -123
- package/test/ensure-output_spec.ts +0 -56
- package/tsconfig.json +0 -23
- package/tslint.json +0 -12
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html class="default no-js">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<title>MakerOptions | @electron-forge/maker-base</title>
|
|
7
|
-
<meta name="description" content="">
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<link rel="stylesheet" href="../assets/css/main.css">
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<header>
|
|
13
|
-
<div class="tsd-page-toolbar">
|
|
14
|
-
<div class="container">
|
|
15
|
-
<div class="table-wrap">
|
|
16
|
-
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
|
|
17
|
-
<div class="field">
|
|
18
|
-
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
|
19
|
-
<input id="tsd-search-field" type="text" />
|
|
20
|
-
</div>
|
|
21
|
-
<ul class="results">
|
|
22
|
-
<li class="state loading">Preparing search index...</li>
|
|
23
|
-
<li class="state failure">The search index is not available</li>
|
|
24
|
-
</ul>
|
|
25
|
-
<a href="../index.html" class="title">@electron-forge/maker-base</a>
|
|
26
|
-
</div>
|
|
27
|
-
<div class="table-cell" id="tsd-widgets">
|
|
28
|
-
<div id="tsd-filter">
|
|
29
|
-
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
|
30
|
-
<div class="tsd-filter-group">
|
|
31
|
-
<div class="tsd-select" id="tsd-filter-visibility">
|
|
32
|
-
<span class="tsd-select-label">All</span>
|
|
33
|
-
<ul class="tsd-select-list">
|
|
34
|
-
<li data-value="public">Public</li>
|
|
35
|
-
<li data-value="protected">Public/Protected</li>
|
|
36
|
-
<li data-value="private" class="selected">All</li>
|
|
37
|
-
</ul>
|
|
38
|
-
</div>
|
|
39
|
-
<input type="checkbox" id="tsd-filter-inherited" checked />
|
|
40
|
-
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
|
41
|
-
<input type="checkbox" id="tsd-filter-only-exported" />
|
|
42
|
-
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
<div class="tsd-page-title">
|
|
51
|
-
<div class="container">
|
|
52
|
-
<ul class="tsd-breadcrumb">
|
|
53
|
-
<li>
|
|
54
|
-
<a href="../globals.html">Globals</a>
|
|
55
|
-
</li>
|
|
56
|
-
<li>
|
|
57
|
-
<a href="makeroptions.html">MakerOptions</a>
|
|
58
|
-
</li>
|
|
59
|
-
</ul>
|
|
60
|
-
<h1>Interface MakerOptions</h1>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
</header>
|
|
64
|
-
<div class="container container-main">
|
|
65
|
-
<div class="row">
|
|
66
|
-
<div class="col-8 col-content">
|
|
67
|
-
<section class="tsd-panel tsd-hierarchy">
|
|
68
|
-
<h3>Hierarchy</h3>
|
|
69
|
-
<ul class="tsd-hierarchy">
|
|
70
|
-
<li>
|
|
71
|
-
<span class="target">MakerOptions</span>
|
|
72
|
-
</li>
|
|
73
|
-
</ul>
|
|
74
|
-
</section>
|
|
75
|
-
<section class="tsd-panel-group tsd-index-group">
|
|
76
|
-
<h2>Index</h2>
|
|
77
|
-
<section class="tsd-panel tsd-index-panel">
|
|
78
|
-
<div class="tsd-index-content">
|
|
79
|
-
<section class="tsd-index-section ">
|
|
80
|
-
<h3>Properties</h3>
|
|
81
|
-
<ul class="tsd-index-list">
|
|
82
|
-
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="makeroptions.html#appname" class="tsd-kind-icon">app<wbr>Name</a></li>
|
|
83
|
-
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="makeroptions.html#dir" class="tsd-kind-icon">dir</a></li>
|
|
84
|
-
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="makeroptions.html#forgeconfig" class="tsd-kind-icon">forge<wbr>Config</a></li>
|
|
85
|
-
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="makeroptions.html#makedir" class="tsd-kind-icon">make<wbr>Dir</a></li>
|
|
86
|
-
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="makeroptions.html#packagejson" class="tsd-kind-icon">packageJSON</a></li>
|
|
87
|
-
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="makeroptions.html#targetarch" class="tsd-kind-icon">target<wbr>Arch</a></li>
|
|
88
|
-
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="makeroptions.html#targetplatform" class="tsd-kind-icon">target<wbr>Platform</a></li>
|
|
89
|
-
</ul>
|
|
90
|
-
</section>
|
|
91
|
-
</div>
|
|
92
|
-
</section>
|
|
93
|
-
</section>
|
|
94
|
-
<section class="tsd-panel-group tsd-member-group ">
|
|
95
|
-
<h2>Properties</h2>
|
|
96
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
97
|
-
<a name="appname" class="tsd-anchor"></a>
|
|
98
|
-
<h3>app<wbr>Name</h3>
|
|
99
|
-
<div class="tsd-signature tsd-kind-icon">app<wbr>Name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
|
100
|
-
<aside class="tsd-sources">
|
|
101
|
-
<ul>
|
|
102
|
-
<li>Defined in <a href="https://github.com/electron-userland/electron-forge/blob/ab64142/packages/maker/base/src/Maker.ts#L20">Maker.ts:20</a></li>
|
|
103
|
-
</ul>
|
|
104
|
-
</aside>
|
|
105
|
-
<div class="tsd-comment tsd-typography">
|
|
106
|
-
<div class="lead">
|
|
107
|
-
<p>The resolved human friendly name of the project</p>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
</section>
|
|
111
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
112
|
-
<a name="dir" class="tsd-anchor"></a>
|
|
113
|
-
<h3>dir</h3>
|
|
114
|
-
<div class="tsd-signature tsd-kind-icon">dir<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
|
115
|
-
<aside class="tsd-sources">
|
|
116
|
-
<ul>
|
|
117
|
-
<li>Defined in <a href="https://github.com/electron-userland/electron-forge/blob/ab64142/packages/maker/base/src/Maker.ts#L11">Maker.ts:11</a></li>
|
|
118
|
-
</ul>
|
|
119
|
-
</aside>
|
|
120
|
-
<div class="tsd-comment tsd-typography">
|
|
121
|
-
<div class="lead">
|
|
122
|
-
<p>The directory containing the packaged Electron application</p>
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
</section>
|
|
126
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
127
|
-
<a name="forgeconfig" class="tsd-anchor"></a>
|
|
128
|
-
<h3>forge<wbr>Config</h3>
|
|
129
|
-
<div class="tsd-signature tsd-kind-icon">forge<wbr>Config<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ForgeConfig</span></div>
|
|
130
|
-
<aside class="tsd-sources">
|
|
131
|
-
<ul>
|
|
132
|
-
<li>Defined in <a href="https://github.com/electron-userland/electron-forge/blob/ab64142/packages/maker/base/src/Maker.ts#L32">Maker.ts:32</a></li>
|
|
133
|
-
</ul>
|
|
134
|
-
</aside>
|
|
135
|
-
<div class="tsd-comment tsd-typography">
|
|
136
|
-
<div class="lead">
|
|
137
|
-
<p>Fully resolved forge configuration, you shouldn't really need this</p>
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
</section>
|
|
141
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
142
|
-
<a name="makedir" class="tsd-anchor"></a>
|
|
143
|
-
<h3>make<wbr>Dir</h3>
|
|
144
|
-
<div class="tsd-signature tsd-kind-icon">make<wbr>Dir<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
|
145
|
-
<aside class="tsd-sources">
|
|
146
|
-
<ul>
|
|
147
|
-
<li>Defined in <a href="https://github.com/electron-userland/electron-forge/blob/ab64142/packages/maker/base/src/Maker.ts#L16">Maker.ts:16</a></li>
|
|
148
|
-
</ul>
|
|
149
|
-
</aside>
|
|
150
|
-
<div class="tsd-comment tsd-typography">
|
|
151
|
-
<div class="lead">
|
|
152
|
-
<p>The directory you should put all your artifacts in (potentially in sub folders)
|
|
153
|
-
NOTE: this directory is not guarunteed to already exist</p>
|
|
154
|
-
</div>
|
|
155
|
-
</div>
|
|
156
|
-
</section>
|
|
157
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
158
|
-
<a name="packagejson" class="tsd-anchor"></a>
|
|
159
|
-
<h3>packageJSON</h3>
|
|
160
|
-
<div class="tsd-signature tsd-kind-icon">packageJSON<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
|
|
161
|
-
<aside class="tsd-sources">
|
|
162
|
-
<ul>
|
|
163
|
-
<li>Defined in <a href="https://github.com/electron-userland/electron-forge/blob/ab64142/packages/maker/base/src/Maker.ts#L36">Maker.ts:36</a></li>
|
|
164
|
-
</ul>
|
|
165
|
-
</aside>
|
|
166
|
-
<div class="tsd-comment tsd-typography">
|
|
167
|
-
<div class="lead">
|
|
168
|
-
<p>The applications package.json file</p>
|
|
169
|
-
</div>
|
|
170
|
-
</div>
|
|
171
|
-
</section>
|
|
172
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
173
|
-
<a name="targetarch" class="tsd-anchor"></a>
|
|
174
|
-
<h3>target<wbr>Arch</h3>
|
|
175
|
-
<div class="tsd-signature tsd-kind-icon">target<wbr>Arch<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ForgeArch</span></div>
|
|
176
|
-
<aside class="tsd-sources">
|
|
177
|
-
<ul>
|
|
178
|
-
<li>Defined in <a href="https://github.com/electron-userland/electron-forge/blob/ab64142/packages/maker/base/src/Maker.ts#L28">Maker.ts:28</a></li>
|
|
179
|
-
</ul>
|
|
180
|
-
</aside>
|
|
181
|
-
<div class="tsd-comment tsd-typography">
|
|
182
|
-
<div class="lead">
|
|
183
|
-
<p>The target architecture you should make for</p>
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
</section>
|
|
187
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
188
|
-
<a name="targetplatform" class="tsd-anchor"></a>
|
|
189
|
-
<h3>target<wbr>Platform</h3>
|
|
190
|
-
<div class="tsd-signature tsd-kind-icon">target<wbr>Platform<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ForgePlatform</span></div>
|
|
191
|
-
<aside class="tsd-sources">
|
|
192
|
-
<ul>
|
|
193
|
-
<li>Defined in <a href="https://github.com/electron-userland/electron-forge/blob/ab64142/packages/maker/base/src/Maker.ts#L24">Maker.ts:24</a></li>
|
|
194
|
-
</ul>
|
|
195
|
-
</aside>
|
|
196
|
-
<div class="tsd-comment tsd-typography">
|
|
197
|
-
<div class="lead">
|
|
198
|
-
<p>The target platform you should make for</p>
|
|
199
|
-
</div>
|
|
200
|
-
</div>
|
|
201
|
-
</section>
|
|
202
|
-
</section>
|
|
203
|
-
</div>
|
|
204
|
-
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
205
|
-
<nav class="tsd-navigation primary">
|
|
206
|
-
<ul>
|
|
207
|
-
<li class="globals ">
|
|
208
|
-
<a href="../globals.html"><em>Globals</em></a>
|
|
209
|
-
</li>
|
|
210
|
-
</ul>
|
|
211
|
-
</nav>
|
|
212
|
-
<nav class="tsd-navigation secondary menu-sticky">
|
|
213
|
-
<ul class="before-current">
|
|
214
|
-
<li class=" tsd-kind-class tsd-has-type-parameter">
|
|
215
|
-
<a href="../classes/maker.html" class="tsd-kind-icon">Maker</a>
|
|
216
|
-
</li>
|
|
217
|
-
</ul>
|
|
218
|
-
<ul class="current">
|
|
219
|
-
<li class="current tsd-kind-interface">
|
|
220
|
-
<a href="makeroptions.html" class="tsd-kind-icon">Maker<wbr>Options</a>
|
|
221
|
-
<ul>
|
|
222
|
-
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
223
|
-
<a href="makeroptions.html#appname" class="tsd-kind-icon">app<wbr>Name</a>
|
|
224
|
-
</li>
|
|
225
|
-
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
226
|
-
<a href="makeroptions.html#dir" class="tsd-kind-icon">dir</a>
|
|
227
|
-
</li>
|
|
228
|
-
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
229
|
-
<a href="makeroptions.html#forgeconfig" class="tsd-kind-icon">forge<wbr>Config</a>
|
|
230
|
-
</li>
|
|
231
|
-
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
232
|
-
<a href="makeroptions.html#makedir" class="tsd-kind-icon">make<wbr>Dir</a>
|
|
233
|
-
</li>
|
|
234
|
-
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
235
|
-
<a href="makeroptions.html#packagejson" class="tsd-kind-icon">packageJSON</a>
|
|
236
|
-
</li>
|
|
237
|
-
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
238
|
-
<a href="makeroptions.html#targetarch" class="tsd-kind-icon">target<wbr>Arch</a>
|
|
239
|
-
</li>
|
|
240
|
-
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
241
|
-
<a href="makeroptions.html#targetplatform" class="tsd-kind-icon">target<wbr>Platform</a>
|
|
242
|
-
</li>
|
|
243
|
-
</ul>
|
|
244
|
-
</li>
|
|
245
|
-
</ul>
|
|
246
|
-
<ul class="after-current">
|
|
247
|
-
</ul>
|
|
248
|
-
</nav>
|
|
249
|
-
</div>
|
|
250
|
-
</div>
|
|
251
|
-
</div>
|
|
252
|
-
<footer>
|
|
253
|
-
<div class="container">
|
|
254
|
-
<h2>Legend</h2>
|
|
255
|
-
<div class="tsd-legend-group">
|
|
256
|
-
<ul class="tsd-legend">
|
|
257
|
-
<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
|
|
258
|
-
<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
|
|
259
|
-
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
|
|
260
|
-
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
|
|
261
|
-
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
|
|
262
|
-
<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
|
|
263
|
-
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
|
|
264
|
-
</ul>
|
|
265
|
-
<ul class="tsd-legend">
|
|
266
|
-
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
|
|
267
|
-
<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
|
|
268
|
-
<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
|
|
269
|
-
<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
|
|
270
|
-
</ul>
|
|
271
|
-
<ul class="tsd-legend">
|
|
272
|
-
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
|
|
273
|
-
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
|
|
274
|
-
<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
|
|
275
|
-
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
|
276
|
-
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
|
|
277
|
-
<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
|
|
278
|
-
</ul>
|
|
279
|
-
<ul class="tsd-legend">
|
|
280
|
-
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
|
|
281
|
-
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
|
|
282
|
-
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
|
|
283
|
-
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
|
|
284
|
-
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
|
|
285
|
-
<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
|
|
286
|
-
<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
|
|
287
|
-
</ul>
|
|
288
|
-
<ul class="tsd-legend">
|
|
289
|
-
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
|
|
290
|
-
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
|
|
291
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
|
|
292
|
-
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
|
|
293
|
-
</ul>
|
|
294
|
-
<ul class="tsd-legend">
|
|
295
|
-
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
|
|
296
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
|
|
297
|
-
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
|
|
298
|
-
</ul>
|
|
299
|
-
<ul class="tsd-legend">
|
|
300
|
-
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
|
|
301
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
|
|
302
|
-
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
|
|
303
|
-
</ul>
|
|
304
|
-
<ul class="tsd-legend">
|
|
305
|
-
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
|
|
306
|
-
<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
|
|
307
|
-
</ul>
|
|
308
|
-
</div>
|
|
309
|
-
</div>
|
|
310
|
-
</footer>
|
|
311
|
-
<div class="overlay"></div>
|
|
312
|
-
<script src="../assets/js/main.js"></script>
|
|
313
|
-
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
|
|
314
|
-
</body>
|
|
315
|
-
</html>
|
package/src/Maker.ts
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-unused-vars */
|
|
2
|
-
|
|
3
|
-
import { ForgeArch, ForgeConfig, ForgePlatform, IForgeMaker } from '@electron-forge/shared-types';
|
|
4
|
-
import fs from 'fs-extra';
|
|
5
|
-
import path from 'path';
|
|
6
|
-
|
|
7
|
-
export interface MakerOptions {
|
|
8
|
-
/**
|
|
9
|
-
* The directory containing the packaged Electron application
|
|
10
|
-
*/
|
|
11
|
-
dir: string;
|
|
12
|
-
/**
|
|
13
|
-
* The directory you should put all your artifacts in (potentially in sub folders)
|
|
14
|
-
* NOTE: this directory is not guarunteed to already exist
|
|
15
|
-
*/
|
|
16
|
-
makeDir: string;
|
|
17
|
-
/**
|
|
18
|
-
* The resolved human friendly name of the project
|
|
19
|
-
*/
|
|
20
|
-
appName: string;
|
|
21
|
-
/**
|
|
22
|
-
* The target platform you should make for
|
|
23
|
-
*/
|
|
24
|
-
targetPlatform: ForgePlatform;
|
|
25
|
-
/**
|
|
26
|
-
* The target architecture you should make for
|
|
27
|
-
*/
|
|
28
|
-
targetArch: ForgeArch;
|
|
29
|
-
/**
|
|
30
|
-
* Fully resolved forge configuration, you shouldn't really need this
|
|
31
|
-
*/
|
|
32
|
-
forgeConfig: ForgeConfig;
|
|
33
|
-
/**
|
|
34
|
-
* The applications package.json file
|
|
35
|
-
*/
|
|
36
|
-
packageJSON: any;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export default abstract class Maker<C> {
|
|
40
|
-
public abstract name: string;
|
|
41
|
-
public abstract defaultPlatforms: ForgePlatform[];
|
|
42
|
-
/* tslint:disable variable-name */
|
|
43
|
-
__isElectronForgeMaker!: true;
|
|
44
|
-
/* tslint:enable variable-name */
|
|
45
|
-
|
|
46
|
-
constructor(public config: C = {} as C, protected providedPlatforms?: ForgePlatform[]) {
|
|
47
|
-
Object.defineProperty(this, '__isElectronForgeMaker', {
|
|
48
|
-
value: true,
|
|
49
|
-
enumerable: false,
|
|
50
|
-
configurable: false,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
get platforms() {
|
|
55
|
-
if (this.providedPlatforms) return this.providedPlatforms;
|
|
56
|
-
return this.defaultPlatforms;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Makers must implement this method and return true or false indicating whether
|
|
61
|
-
* this maker can be run on the current platform. Normally this is just a process.platform
|
|
62
|
-
* check but it can be a deeper check for dependencies like fake-root or other
|
|
63
|
-
* required external build tools.
|
|
64
|
-
*
|
|
65
|
-
* If the issue is a missing dependency you should log out a HELPFUL error message
|
|
66
|
-
* telling the developer exactly what is missing and if possible how to get it.
|
|
67
|
-
*/
|
|
68
|
-
isSupportedOnCurrentPlatform(): boolean {
|
|
69
|
-
throw new Error(`Maker ${this.name} did not implement the isSupportedOnCurrentPlatform method`);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Makers must implement this method and return an array of absolute paths
|
|
74
|
-
* to the artifacts generated by your maker
|
|
75
|
-
*/
|
|
76
|
-
async make(opts: MakerOptions): Promise<string[]> {
|
|
77
|
-
throw new Error(`Maker ${this.name} did not implement the make method`);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Helpers
|
|
83
|
-
*/
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Ensures the directory exists and is forced to be empty.
|
|
87
|
-
*
|
|
88
|
-
* I.e. If the directory already exists it is deleted and recreated, this
|
|
89
|
-
* is a destructive operation
|
|
90
|
-
*/
|
|
91
|
-
async ensureDirectory(dir: string): Promise<void> {
|
|
92
|
-
if (await fs.pathExists(dir)) {
|
|
93
|
-
await fs.remove(dir);
|
|
94
|
-
}
|
|
95
|
-
return fs.mkdirs(dir);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Ensures the path to the file exists and the file does not exist
|
|
100
|
-
*
|
|
101
|
-
* I.e. If the file already exists it is deleted and the path created
|
|
102
|
-
*/
|
|
103
|
-
async ensureFile(file: string): Promise<void> {
|
|
104
|
-
if (await fs.pathExists(file)) {
|
|
105
|
-
await fs.remove(file);
|
|
106
|
-
}
|
|
107
|
-
await fs.mkdirs(path.dirname(file));
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Checks if the given module is installed, used for testing if optional dependencies
|
|
112
|
-
* are installed or not
|
|
113
|
-
*/
|
|
114
|
-
isInstalled(module: string): boolean {
|
|
115
|
-
try {
|
|
116
|
-
require(module);
|
|
117
|
-
return true;
|
|
118
|
-
} catch (e) {
|
|
119
|
-
// Package doesn't exist -- must not be installable on this platform
|
|
120
|
-
return false;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { expect } from 'chai';
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
import os from 'os';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
|
|
6
|
-
import MakerBase from '../src/Maker';
|
|
7
|
-
|
|
8
|
-
class MakerImpl extends MakerBase<{}> {
|
|
9
|
-
name = 'test';
|
|
10
|
-
defaultPlatforms = [];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
describe('ensure-output', () => {
|
|
14
|
-
const maker = new MakerImpl({}, []);
|
|
15
|
-
const tmpPath = path.resolve(os.tmpdir(), 'forge-ensure');
|
|
16
|
-
|
|
17
|
-
before(async () => {
|
|
18
|
-
await fs.mkdirs(tmpPath);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
describe('ensureDirectory', () => {
|
|
22
|
-
it('should delete the directory contents if it exists', async () => {
|
|
23
|
-
await fs.mkdirs(path.resolve(tmpPath, 'foo'));
|
|
24
|
-
fs.writeFileSync(path.resolve(tmpPath, 'foo', 'touchedFile'), '');
|
|
25
|
-
expect(await fs.pathExists(path.resolve(tmpPath, 'foo', 'touchedFile'))).to.equal(true);
|
|
26
|
-
await maker.ensureDirectory(path.resolve(tmpPath, 'foo'));
|
|
27
|
-
expect(await fs.pathExists(path.resolve(tmpPath, 'foo', 'touchedFile'))).to.equal(false);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it('should create the directory if it does not exist', async () => {
|
|
31
|
-
expect(await fs.pathExists(path.resolve(tmpPath, 'bar'))).to.equal(false);
|
|
32
|
-
await maker.ensureDirectory(path.resolve(tmpPath, 'bar'));
|
|
33
|
-
expect(await fs.pathExists(path.resolve(tmpPath, 'bar'))).to.equal(true);
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
describe('ensureFile', () => {
|
|
38
|
-
it('should delete the file if it exists', async () => {
|
|
39
|
-
await fs.mkdirs(path.resolve(tmpPath, 'foo'));
|
|
40
|
-
fs.writeFileSync(path.resolve(tmpPath, 'foo', 'touchedFile'), '');
|
|
41
|
-
expect(await fs.pathExists(path.resolve(tmpPath, 'foo', 'touchedFile'))).to.equal(true);
|
|
42
|
-
await maker.ensureFile(path.resolve(tmpPath, 'foo'));
|
|
43
|
-
expect(await fs.pathExists(path.resolve(tmpPath, 'foo', 'touchedFile'))).to.equal(false);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
it('should create the containing directory if it does not exist', async () => {
|
|
47
|
-
expect(await fs.pathExists(path.resolve(tmpPath, 'bar'))).to.equal(false);
|
|
48
|
-
await maker.ensureFile(path.resolve(tmpPath, 'bar', 'file'));
|
|
49
|
-
expect(await fs.pathExists(path.resolve(tmpPath, 'bar'))).to.equal(true);
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
afterEach(async () => {
|
|
54
|
-
await fs.remove(tmpPath);
|
|
55
|
-
});
|
|
56
|
-
});
|
package/tsconfig.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"target": "es6",
|
|
5
|
-
"outDir": "dist",
|
|
6
|
-
"lib": [
|
|
7
|
-
"es6",
|
|
8
|
-
"dom",
|
|
9
|
-
"es7"
|
|
10
|
-
],
|
|
11
|
-
"sourceMap": true,
|
|
12
|
-
"rootDir": "src",
|
|
13
|
-
"experimentalDecorators": true,
|
|
14
|
-
"strict": true,
|
|
15
|
-
"esModuleInterop": true,
|
|
16
|
-
"declaration": true
|
|
17
|
-
},
|
|
18
|
-
"exclude": [
|
|
19
|
-
"node_modules",
|
|
20
|
-
"dist",
|
|
21
|
-
"test"
|
|
22
|
-
]
|
|
23
|
-
}
|
package/tslint.json
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "tslint-config-airbnb",
|
|
3
|
-
"rules": {
|
|
4
|
-
"no-boolean-literal-compare": false,
|
|
5
|
-
"import-name": false,
|
|
6
|
-
"align": false,
|
|
7
|
-
"variable-name": [true, "ban-keywords", "check-format", "allow-pascal-case"],
|
|
8
|
-
"no-this-assignment": [true, { "allow-destructuring": true }],
|
|
9
|
-
"max-line-length": false,
|
|
10
|
-
"no-parameter-reassignment": false
|
|
11
|
-
}
|
|
12
|
-
}
|