UNPKG

107 kBJSONView Raw
1[
2 {
3 "__docId__": 1,
4 "kind": "external",
5 "name": "Infinity",
6 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity",
7 "memberof": "api/.external-ecmascript.js",
8 "static": true,
9 "longname": "api/.external-ecmascript.js~Infinity",
10 "access": "public",
11 "description": "",
12 "builtinExternal": true
13 },
14 {
15 "__docId__": 2,
16 "kind": "external",
17 "name": "NaN",
18 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN",
19 "memberof": "api/.external-ecmascript.js",
20 "static": true,
21 "longname": "api/.external-ecmascript.js~NaN",
22 "access": "public",
23 "description": "",
24 "builtinExternal": true
25 },
26 {
27 "__docId__": 3,
28 "kind": "external",
29 "name": "undefined",
30 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",
31 "memberof": "api/.external-ecmascript.js",
32 "static": true,
33 "longname": "api/.external-ecmascript.js~undefined",
34 "access": "public",
35 "description": "",
36 "builtinExternal": true
37 },
38 {
39 "__docId__": 4,
40 "kind": "external",
41 "name": "null",
42 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null",
43 "memberof": "api/.external-ecmascript.js",
44 "static": true,
45 "longname": "api/.external-ecmascript.js~null",
46 "access": "public",
47 "description": "",
48 "builtinExternal": true
49 },
50 {
51 "__docId__": 5,
52 "kind": "external",
53 "name": "Object",
54 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
55 "memberof": "api/.external-ecmascript.js",
56 "static": true,
57 "longname": "api/.external-ecmascript.js~Object",
58 "access": "public",
59 "description": "",
60 "builtinExternal": true
61 },
62 {
63 "__docId__": 6,
64 "kind": "external",
65 "name": "object",
66 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
67 "memberof": "api/.external-ecmascript.js",
68 "static": true,
69 "longname": "api/.external-ecmascript.js~object",
70 "access": "public",
71 "description": "",
72 "builtinExternal": true
73 },
74 {
75 "__docId__": 7,
76 "kind": "external",
77 "name": "Function",
78 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
79 "memberof": "api/.external-ecmascript.js",
80 "static": true,
81 "longname": "api/.external-ecmascript.js~Function",
82 "access": "public",
83 "description": "",
84 "builtinExternal": true
85 },
86 {
87 "__docId__": 8,
88 "kind": "external",
89 "name": "function",
90 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
91 "memberof": "api/.external-ecmascript.js",
92 "static": true,
93 "longname": "api/.external-ecmascript.js~function",
94 "access": "public",
95 "description": "",
96 "builtinExternal": true
97 },
98 {
99 "__docId__": 9,
100 "kind": "external",
101 "name": "Boolean",
102 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
103 "memberof": "api/.external-ecmascript.js",
104 "static": true,
105 "longname": "api/.external-ecmascript.js~Boolean",
106 "access": "public",
107 "description": "",
108 "builtinExternal": true
109 },
110 {
111 "__docId__": 10,
112 "kind": "external",
113 "name": "boolean",
114 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
115 "memberof": "api/.external-ecmascript.js",
116 "static": true,
117 "longname": "api/.external-ecmascript.js~boolean",
118 "access": "public",
119 "description": "",
120 "builtinExternal": true
121 },
122 {
123 "__docId__": 11,
124 "kind": "external",
125 "name": "Symbol",
126 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol",
127 "memberof": "api/.external-ecmascript.js",
128 "static": true,
129 "longname": "api/.external-ecmascript.js~Symbol",
130 "access": "public",
131 "description": "",
132 "builtinExternal": true
133 },
134 {
135 "__docId__": 12,
136 "kind": "external",
137 "name": "Error",
138 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error",
139 "memberof": "api/.external-ecmascript.js",
140 "static": true,
141 "longname": "api/.external-ecmascript.js~Error",
142 "access": "public",
143 "description": "",
144 "builtinExternal": true
145 },
146 {
147 "__docId__": 13,
148 "kind": "external",
149 "name": "EvalError",
150 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError",
151 "memberof": "api/.external-ecmascript.js",
152 "static": true,
153 "longname": "api/.external-ecmascript.js~EvalError",
154 "access": "public",
155 "description": "",
156 "builtinExternal": true
157 },
158 {
159 "__docId__": 14,
160 "kind": "external",
161 "name": "InternalError",
162 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError",
163 "memberof": "api/.external-ecmascript.js",
164 "static": true,
165 "longname": "api/.external-ecmascript.js~InternalError",
166 "access": "public",
167 "description": "",
168 "builtinExternal": true
169 },
170 {
171 "__docId__": 15,
172 "kind": "external",
173 "name": "RangeError",
174 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError",
175 "memberof": "api/.external-ecmascript.js",
176 "static": true,
177 "longname": "api/.external-ecmascript.js~RangeError",
178 "access": "public",
179 "description": "",
180 "builtinExternal": true
181 },
182 {
183 "__docId__": 16,
184 "kind": "external",
185 "name": "ReferenceError",
186 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError",
187 "memberof": "api/.external-ecmascript.js",
188 "static": true,
189 "longname": "api/.external-ecmascript.js~ReferenceError",
190 "access": "public",
191 "description": "",
192 "builtinExternal": true
193 },
194 {
195 "__docId__": 17,
196 "kind": "external",
197 "name": "SyntaxError",
198 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError",
199 "memberof": "api/.external-ecmascript.js",
200 "static": true,
201 "longname": "api/.external-ecmascript.js~SyntaxError",
202 "access": "public",
203 "description": "",
204 "builtinExternal": true
205 },
206 {
207 "__docId__": 18,
208 "kind": "external",
209 "name": "TypeError",
210 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError",
211 "memberof": "api/.external-ecmascript.js",
212 "static": true,
213 "longname": "api/.external-ecmascript.js~TypeError",
214 "access": "public",
215 "description": "",
216 "builtinExternal": true
217 },
218 {
219 "__docId__": 19,
220 "kind": "external",
221 "name": "URIError",
222 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError",
223 "memberof": "api/.external-ecmascript.js",
224 "static": true,
225 "longname": "api/.external-ecmascript.js~URIError",
226 "access": "public",
227 "description": "",
228 "builtinExternal": true
229 },
230 {
231 "__docId__": 20,
232 "kind": "external",
233 "name": "Number",
234 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
235 "memberof": "api/.external-ecmascript.js",
236 "static": true,
237 "longname": "api/.external-ecmascript.js~Number",
238 "access": "public",
239 "description": "",
240 "builtinExternal": true
241 },
242 {
243 "__docId__": 21,
244 "kind": "external",
245 "name": "number",
246 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
247 "memberof": "api/.external-ecmascript.js",
248 "static": true,
249 "longname": "api/.external-ecmascript.js~number",
250 "access": "public",
251 "description": "",
252 "builtinExternal": true
253 },
254 {
255 "__docId__": 22,
256 "kind": "external",
257 "name": "Date",
258 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date",
259 "memberof": "api/.external-ecmascript.js",
260 "static": true,
261 "longname": "api/.external-ecmascript.js~Date",
262 "access": "public",
263 "description": "",
264 "builtinExternal": true
265 },
266 {
267 "__docId__": 23,
268 "kind": "external",
269 "name": "String",
270 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
271 "memberof": "api/.external-ecmascript.js",
272 "static": true,
273 "longname": "api/.external-ecmascript.js~String",
274 "access": "public",
275 "description": "",
276 "builtinExternal": true
277 },
278 {
279 "__docId__": 24,
280 "kind": "external",
281 "name": "string",
282 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
283 "memberof": "api/.external-ecmascript.js",
284 "static": true,
285 "longname": "api/.external-ecmascript.js~string",
286 "access": "public",
287 "description": "",
288 "builtinExternal": true
289 },
290 {
291 "__docId__": 25,
292 "kind": "external",
293 "name": "RegExp",
294 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp",
295 "memberof": "api/.external-ecmascript.js",
296 "static": true,
297 "longname": "api/.external-ecmascript.js~RegExp",
298 "access": "public",
299 "description": "",
300 "builtinExternal": true
301 },
302 {
303 "__docId__": 26,
304 "kind": "external",
305 "name": "Array",
306 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",
307 "memberof": "api/.external-ecmascript.js",
308 "static": true,
309 "longname": "api/.external-ecmascript.js~Array",
310 "access": "public",
311 "description": "",
312 "builtinExternal": true
313 },
314 {
315 "__docId__": 27,
316 "kind": "external",
317 "name": "Int8Array",
318 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array",
319 "memberof": "api/.external-ecmascript.js",
320 "static": true,
321 "longname": "api/.external-ecmascript.js~Int8Array",
322 "access": "public",
323 "description": "",
324 "builtinExternal": true
325 },
326 {
327 "__docId__": 28,
328 "kind": "external",
329 "name": "Uint8Array",
330 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array",
331 "memberof": "api/.external-ecmascript.js",
332 "static": true,
333 "longname": "api/.external-ecmascript.js~Uint8Array",
334 "access": "public",
335 "description": "",
336 "builtinExternal": true
337 },
338 {
339 "__docId__": 29,
340 "kind": "external",
341 "name": "Uint8ClampedArray",
342 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray",
343 "memberof": "api/.external-ecmascript.js",
344 "static": true,
345 "longname": "api/.external-ecmascript.js~Uint8ClampedArray",
346 "access": "public",
347 "description": "",
348 "builtinExternal": true
349 },
350 {
351 "__docId__": 30,
352 "kind": "external",
353 "name": "Int16Array",
354 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array",
355 "memberof": "api/.external-ecmascript.js",
356 "static": true,
357 "longname": "api/.external-ecmascript.js~Int16Array",
358 "access": "public",
359 "description": "",
360 "builtinExternal": true
361 },
362 {
363 "__docId__": 31,
364 "kind": "external",
365 "name": "Uint16Array",
366 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array",
367 "memberof": "api/.external-ecmascript.js",
368 "static": true,
369 "longname": "api/.external-ecmascript.js~Uint16Array",
370 "access": "public",
371 "description": "",
372 "builtinExternal": true
373 },
374 {
375 "__docId__": 32,
376 "kind": "external",
377 "name": "Int32Array",
378 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array",
379 "memberof": "api/.external-ecmascript.js",
380 "static": true,
381 "longname": "api/.external-ecmascript.js~Int32Array",
382 "access": "public",
383 "description": "",
384 "builtinExternal": true
385 },
386 {
387 "__docId__": 33,
388 "kind": "external",
389 "name": "Uint32Array",
390 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array",
391 "memberof": "api/.external-ecmascript.js",
392 "static": true,
393 "longname": "api/.external-ecmascript.js~Uint32Array",
394 "access": "public",
395 "description": "",
396 "builtinExternal": true
397 },
398 {
399 "__docId__": 34,
400 "kind": "external",
401 "name": "Float32Array",
402 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array",
403 "memberof": "api/.external-ecmascript.js",
404 "static": true,
405 "longname": "api/.external-ecmascript.js~Float32Array",
406 "access": "public",
407 "description": "",
408 "builtinExternal": true
409 },
410 {
411 "__docId__": 35,
412 "kind": "external",
413 "name": "Float64Array",
414 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array",
415 "memberof": "api/.external-ecmascript.js",
416 "static": true,
417 "longname": "api/.external-ecmascript.js~Float64Array",
418 "access": "public",
419 "description": "",
420 "builtinExternal": true
421 },
422 {
423 "__docId__": 36,
424 "kind": "external",
425 "name": "Map",
426 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map",
427 "memberof": "api/.external-ecmascript.js",
428 "static": true,
429 "longname": "api/.external-ecmascript.js~Map",
430 "access": "public",
431 "description": "",
432 "builtinExternal": true
433 },
434 {
435 "__docId__": 37,
436 "kind": "external",
437 "name": "Set",
438 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set",
439 "memberof": "api/.external-ecmascript.js",
440 "static": true,
441 "longname": "api/.external-ecmascript.js~Set",
442 "access": "public",
443 "description": "",
444 "builtinExternal": true
445 },
446 {
447 "__docId__": 38,
448 "kind": "external",
449 "name": "WeakMap",
450 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap",
451 "memberof": "api/.external-ecmascript.js",
452 "static": true,
453 "longname": "api/.external-ecmascript.js~WeakMap",
454 "access": "public",
455 "description": "",
456 "builtinExternal": true
457 },
458 {
459 "__docId__": 39,
460 "kind": "external",
461 "name": "WeakSet",
462 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet",
463 "memberof": "api/.external-ecmascript.js",
464 "static": true,
465 "longname": "api/.external-ecmascript.js~WeakSet",
466 "access": "public",
467 "description": "",
468 "builtinExternal": true
469 },
470 {
471 "__docId__": 40,
472 "kind": "external",
473 "name": "ArrayBuffer",
474 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer",
475 "memberof": "api/.external-ecmascript.js",
476 "static": true,
477 "longname": "api/.external-ecmascript.js~ArrayBuffer",
478 "access": "public",
479 "description": "",
480 "builtinExternal": true
481 },
482 {
483 "__docId__": 41,
484 "kind": "external",
485 "name": "DataView",
486 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView",
487 "memberof": "api/.external-ecmascript.js",
488 "static": true,
489 "longname": "api/.external-ecmascript.js~DataView",
490 "access": "public",
491 "description": "",
492 "builtinExternal": true
493 },
494 {
495 "__docId__": 42,
496 "kind": "external",
497 "name": "JSON",
498 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON",
499 "memberof": "api/.external-ecmascript.js",
500 "static": true,
501 "longname": "api/.external-ecmascript.js~JSON",
502 "access": "public",
503 "description": "",
504 "builtinExternal": true
505 },
506 {
507 "__docId__": 43,
508 "kind": "external",
509 "name": "Promise",
510 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",
511 "memberof": "api/.external-ecmascript.js",
512 "static": true,
513 "longname": "api/.external-ecmascript.js~Promise",
514 "access": "public",
515 "description": "",
516 "builtinExternal": true
517 },
518 {
519 "__docId__": 44,
520 "kind": "external",
521 "name": "Generator",
522 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator",
523 "memberof": "api/.external-ecmascript.js",
524 "static": true,
525 "longname": "api/.external-ecmascript.js~Generator",
526 "access": "public",
527 "description": "",
528 "builtinExternal": true
529 },
530 {
531 "__docId__": 45,
532 "kind": "external",
533 "name": "GeneratorFunction",
534 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction",
535 "memberof": "api/.external-ecmascript.js",
536 "static": true,
537 "longname": "api/.external-ecmascript.js~GeneratorFunction",
538 "access": "public",
539 "description": "",
540 "builtinExternal": true
541 },
542 {
543 "__docId__": 46,
544 "kind": "external",
545 "name": "Reflect",
546 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect",
547 "memberof": "api/.external-ecmascript.js",
548 "static": true,
549 "longname": "api/.external-ecmascript.js~Reflect",
550 "access": "public",
551 "description": "",
552 "builtinExternal": true
553 },
554 {
555 "__docId__": 47,
556 "kind": "external",
557 "name": "Proxy",
558 "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy",
559 "memberof": "api/.external-ecmascript.js",
560 "static": true,
561 "longname": "api/.external-ecmascript.js~Proxy",
562 "access": "public",
563 "description": "",
564 "builtinExternal": true
565 },
566 {
567 "__docId__": 48,
568 "kind": "file",
569 "name": "api/import.js",
570 "content": "import debug from 'debug';\nimport fs from 'fs-extra';\nimport inquirer from 'inquirer';\nimport path from 'path';\n\nimport initGit from '../init/init-git';\nimport { deps, devDeps, exactDevDeps } from '../init/init-npm';\n\nimport asyncOra from '../util/ora-handler';\nimport { info, warn } from '../util/messages';\nimport installDepList from '../util/install-dependencies';\nimport readPackageJSON from '../util/read-package-json';\nimport confirmIfInteractive from '../util/confirm-if-interactive';\nimport { yarnOrNpmSpawn, hasYarn } from '../util/yarn-or-npm';\n\nconst d = debug('electron-forge:import');\n\n/**\n * @typedef {Object} ImportOptions\n * @property {string} [dir=process.cwd()] The path to the app to be imported\n * @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually\n * @property {boolean} [updateScripts=true] Whether to update the modules package.json scripts to be electron-forge commands\n * @property {string} [outDir=`${dir}/out`] The path to the directory containing generated distributables\n */\n\n/**\n * Attempt to import a given module directory to the Electron Forge standard.\n *\n * - Replaces the prebuilt electron package with the one that integrates with `electron-compile`\n * - Sets up `git` and the correct NPM dependencies\n * - Adds a template forge config to `package.json`\n *\n * @param {ImportOptions} providedOptions - Options for the import method\n * @return {Promise} Will resolve when the import process is complete\n */\nexport default async (providedOptions = {}) => {\n const { dir, interactive, updateScripts } = Object.assign({\n dir: process.cwd(),\n interactive: false,\n updateScripts: true,\n }, providedOptions);\n\n const outDir = providedOptions.outDir || 'out';\n asyncOra.interactive = interactive;\n\n d(`Attempting to import project in: ${dir}`);\n if (!await fs.pathExists(dir) || !await fs.pathExists(path.resolve(dir, 'package.json'))) {\n throw `We couldn't find a project in: ${dir}`;\n }\n\n // eslint-disable-next-line max-len\n const confirm = await confirmIfInteractive(interactive, `WARNING: We will now attempt to import: \"${dir}\". This will involve modifying some files, are you sure you want to continue?`);\n\n if (!confirm) {\n process.exit(0);\n }\n\n await initGit(dir);\n\n let packageJSON = await readPackageJSON(dir);\n if (packageJSON.config && packageJSON.config.forge) {\n warn(interactive, 'It looks like this project is already configured for \"electron-forge\"'.green);\n const shouldContinue = await confirmIfInteractive(interactive, 'Are you sure you want to continue?');\n\n if (!shouldContinue) {\n process.exit(0);\n }\n }\n\n // eslint-disable-next-line max-len\n const shouldChangeMain = await confirmIfInteractive(interactive, 'Do you want us to change the \"main\" attribute of your package.json? If you are currently using babel and pointing to a \"build\" directory say yes.', false);\n if (shouldChangeMain) {\n const { newMain } = await inquirer.createPromptModule()({\n type: 'input',\n name: 'newMain',\n default: packageJSON.main,\n message: 'Enter the relative path to your uncompiled main file',\n });\n packageJSON.main = newMain;\n }\n\n packageJSON.dependencies = packageJSON.dependencies || {};\n packageJSON.devDependencies = packageJSON.devDependencies || {};\n\n const keys = Object.keys(packageJSON.dependencies).concat(Object.keys(packageJSON.devDependencies));\n const buildToolPackages = {\n 'electron-builder': 'provides mostly equivalent functionality',\n 'electron-download': 'already uses this module as a transitive dependency',\n 'electron-installer-debian': 'already uses this module as a transitive dependency',\n 'electron-installer-dmg': 'already uses this module as a transitive dependency',\n 'electron-installer-flatpak': 'already uses this module as a transitive dependency',\n 'electron-installer-redhat': 'already uses this module as a transitive dependency',\n 'electron-osx-sign': 'already uses this module as a transitive dependency',\n 'electron-packager': 'already uses this module as a transitive dependency',\n 'electron-winstaller': 'already uses this module as a transitive dependency',\n };\n\n let electronName;\n for (const key of keys) {\n if (key === 'electron' || key === 'electron-prebuilt') {\n delete packageJSON.dependencies[key];\n delete packageJSON.devDependencies[key];\n electronName = key;\n } else if (buildToolPackages[key]) {\n const explanation = buildToolPackages[key];\n // eslint-disable-next-line max-len\n const shouldRemoveDependency = await confirmIfInteractive(interactive, `Do you want us to remove the \"${key}\" dependency in package.json? Electron Forge ${explanation}.`);\n\n if (shouldRemoveDependency) {\n delete packageJSON.dependencies[key];\n delete packageJSON.devDependencies[key];\n }\n }\n }\n\n packageJSON.scripts = packageJSON.scripts || {};\n d('reading current scripts object:', packageJSON.scripts);\n\n const updatePackageScript = async (scriptName, newValue) => {\n if (packageJSON.scripts[scriptName] !== newValue) {\n // eslint-disable-next-line max-len\n const shouldUpdate = await confirmIfInteractive(interactive, `Do you want us to update the \"${scriptName}\" script to instead call the electron-forge task \"${newValue}\"`, updateScripts);\n if (shouldUpdate) {\n packageJSON.scripts[scriptName] = newValue;\n }\n }\n };\n\n await updatePackageScript('start', 'electron-forge start');\n await updatePackageScript('package', 'electron-forge package');\n await updatePackageScript('make', 'electron-forge make');\n\n d('forgified scripts object:', packageJSON.scripts);\n\n const writeChanges = async () => {\n await asyncOra('Writing modified package.json file', async () => {\n await fs.writeFile(path.resolve(dir, 'package.json'), `${JSON.stringify(packageJSON, null, 2)}\\n`);\n });\n };\n\n let electronVersion;\n if (electronName) {\n const electronPackageJSON = await readPackageJSON(path.resolve(dir, 'node_modules', electronName));\n electronVersion = electronPackageJSON.version;\n packageJSON.devDependencies['electron-prebuilt-compile'] = electronVersion;\n }\n\n await writeChanges();\n\n if (electronName) {\n await asyncOra('Pruning deleted modules', async () => {\n d('attempting to prune node_modules in:', dir);\n await yarnOrNpmSpawn(hasYarn() ? [] : ['prune'], {\n cwd: dir,\n stdio: 'ignore',\n });\n });\n }\n\n await asyncOra('Installing dependencies', async () => {\n d('deleting old dependencies forcefully');\n await fs.remove(path.resolve(dir, 'node_modules/.bin/electron'));\n await fs.remove(path.resolve(dir, 'node_modules/.bin/electron.cmd'));\n\n if (electronName) {\n await fs.remove(path.resolve(dir, 'node_modules', electronName));\n }\n\n d('installing dependencies');\n await installDepList(dir, deps);\n\n d('installing devDependencies');\n await installDepList(dir, devDeps, true);\n\n d('installing exactDevDependencies');\n await installDepList(dir, exactDevDeps.map((dep) => {\n if (dep === 'electron-prebuild-compile') {\n return `${dep}@${electronVersion || 'latest'}`;\n }\n\n return dep;\n }), true, true);\n });\n\n packageJSON = await readPackageJSON(dir);\n\n packageJSON.config = packageJSON.config || {};\n const templatePackageJSON = await readPackageJSON(path.resolve(__dirname, '../../tmpl'));\n packageJSON.config.forge = templatePackageJSON.config.forge;\n\n await writeChanges();\n\n await asyncOra('Fixing .gitignore', async () => {\n if (await fs.pathExists(path.resolve(dir, '.gitignore'))) {\n const gitignore = await fs.readFile(path.resolve(dir, '.gitignore'));\n if (!gitignore.includes(outDir)) {\n await fs.writeFile(path.resolve(dir, '.gitignore'), `${gitignore}\\n${outDir}/`);\n }\n }\n });\n\n let babelConfig = packageJSON.babel;\n const babelPath = path.resolve(dir, '.babelrc');\n if (!babelConfig && await fs.pathExists(babelPath)) {\n babelConfig = JSON.parse(await fs.readFile(babelPath, 'utf8'));\n }\n\n if (babelConfig) {\n await asyncOra('Porting original babel config', async () => {\n let compileConfig = {};\n const compilePath = path.resolve(dir, '.compilerc');\n if (await fs.pathExists(compilePath)) {\n compileConfig = JSON.parse(await fs.readFile(compilePath, 'utf8'));\n }\n\n await fs.writeFile(compilePath, JSON.stringify(Object.assign(compileConfig, {\n 'application/javascript': babelConfig,\n }), null, 2));\n });\n\n info(interactive, 'NOTE: You might be able to remove your `.compilerc` file completely if you are only using the `es2016` and `react` presets'.yellow);\n }\n\n info(interactive, `\n\nWe have ATTEMPTED to convert your app to be in a format that electron-forge understands.\nNothing much will have changed but we added the ${'\"electron-prebuilt-compile\"'.cyan} dependency. This is \\\nthe dependency you must version bump to get newer versions of Electron.\n\n\nWe also tried to import any build tooling you already had but we can't get everything. You might need to convert any CLI/gulp/grunt tasks yourself.\n\nAlso please note if you are using \\`preload\\` scripts you need to follow the steps outlined \\\nat https://github.com/electron-userland/electron-forge/wiki/Using-%27preload%27-scripts\n\nThanks for using ${'\"electron-forge\"'.green}!!!`);\n};\n",
571 "static": true,
572 "longname": "/Users/sattard/projects/electron-forge/src/api/import.js",
573 "access": "public",
574 "description": null,
575 "lineNumber": 1
576 },
577 {
578 "__docId__": 49,
579 "kind": "variable",
580 "name": "d",
581 "memberof": "api/import.js",
582 "static": true,
583 "longname": "api/import.js~d",
584 "access": "public",
585 "export": false,
586 "importPath": "electron-forge/dist/api/import",
587 "importStyle": null,
588 "description": null,
589 "lineNumber": 16,
590 "undocument": true,
591 "type": {
592 "types": [
593 "*"
594 ]
595 },
596 "ignore": true
597 },
598 {
599 "__docId__": 50,
600 "kind": "typedef",
601 "name": "ImportOptions",
602 "memberof": "api/import.js",
603 "static": true,
604 "longname": "api/import.js~ImportOptions",
605 "access": "public",
606 "description": "",
607 "properties": [
608 {
609 "nullable": null,
610 "types": [
611 "string"
612 ],
613 "spread": false,
614 "optional": true,
615 "defaultValue": "process.cwd()",
616 "defaultRaw": "process.cwd()",
617 "name": "dir",
618 "description": "The path to the app to be imported"
619 },
620 {
621 "nullable": null,
622 "types": [
623 "boolean"
624 ],
625 "spread": false,
626 "optional": true,
627 "defaultValue": "false",
628 "defaultRaw": false,
629 "name": "interactive",
630 "description": "Whether to use sensible defaults or prompt the user visually"
631 },
632 {
633 "nullable": null,
634 "types": [
635 "boolean"
636 ],
637 "spread": false,
638 "optional": true,
639 "defaultValue": "true",
640 "defaultRaw": true,
641 "name": "updateScripts",
642 "description": "Whether to update the modules package.json scripts to be electron-forge commands"
643 },
644 {
645 "nullable": null,
646 "types": [
647 "string"
648 ],
649 "spread": false,
650 "optional": true,
651 "defaultValue": "`${dir}/out`",
652 "defaultRaw": "`${dir}/out`",
653 "name": "outDir",
654 "description": "The path to the directory containing generated distributables"
655 }
656 ],
657 "type": {
658 "types": [
659 "Object"
660 ],
661 "optional": false,
662 "name": "ImportOptions"
663 }
664 },
665 {
666 "__docId__": 51,
667 "kind": "function",
668 "name": "import",
669 "memberof": "api/import.js",
670 "generator": false,
671 "async": true,
672 "static": true,
673 "longname": "api/import.js~import",
674 "access": "public",
675 "export": true,
676 "importPath": "electron-forge/dist/api/import",
677 "importStyle": "import",
678 "description": "Attempt to import a given module directory to the Electron Forge standard.\n\n- Replaces the prebuilt electron package with the one that integrates with `electron-compile`\n- Sets up `git` and the correct NPM dependencies\n- Adds a template forge config to `package.json`",
679 "lineNumber": 36,
680 "params": [
681 {
682 "nullable": null,
683 "types": [
684 "ImportOptions"
685 ],
686 "spread": false,
687 "optional": false,
688 "name": "providedOptions",
689 "description": "Options for the import method"
690 }
691 ],
692 "return": {
693 "nullable": null,
694 "types": [
695 "Promise"
696 ],
697 "spread": false,
698 "description": "Will resolve when the import process is complete"
699 }
700 },
701 {
702 "__docId__": 52,
703 "kind": "file",
704 "name": "api/index.js",
705 "content": "import 'colors';\n\nimport _import from './import';\nimport init from './init';\nimport install from './install';\nimport lint from './lint';\nimport make from './make';\nimport _package from './package';\nimport publish from './publish';\nimport start from './start';\n\nimport getForgeConfig from '../util/forge-config';\nimport readPackageJSON from '../util/read-package-json';\n\nmodule.exports = {\n 'import': _import, // eslint-disable-line\n init,\n install,\n lint,\n make,\n 'package': _package, // eslint-disable-line\n publish,\n start,\n utils: {\n getForgeConfig,\n readPackageJSON,\n },\n};\n",
706 "static": true,
707 "longname": "/Users/sattard/projects/electron-forge/src/api/index.js",
708 "access": "public",
709 "description": null,
710 "lineNumber": 1
711 },
712 {
713 "__docId__": 53,
714 "kind": "file",
715 "name": "api/init.js",
716 "content": "import debug from 'debug';\n\nimport initCustom from '../init/init-custom';\nimport initDirectory from '../init/init-directory';\nimport initGit from '../init/init-git';\nimport initNPM from '../init/init-npm';\nimport initStandardFix from '../init/init-standard-fix';\nimport initStarter from '../init/init-starter-files';\n\nimport asyncOra from '../util/ora-handler';\n\nconst d = debug('electron-forge:init');\n\n/**\n * @typedef {Object} InitOptions\n * @property {string} [dir=process.cwd()] The path to the app to be initialized\n * @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually\n * @property {string} [lintstyle=airbnb] The lintstyle to pass through to the template creator\n * @property {string} [template] The custom template to use. If left empty, the default template is used\n */\n\n/**\n * Initialize a new Electron Forge template project in the given directory.\n *\n * @param {InitOptions} providedOptions - Options for the init method\n * @return {Promise} Will resolve when the initialization process is complete\n */\nexport default async (providedOptions = {}) => {\n // eslint-disable-next-line prefer-const, no-unused-vars\n let { dir, interactive, lintstyle, template } = Object.assign({\n dir: process.cwd(),\n interactive: false,\n lintstyle: 'airbnb',\n template: null,\n }, providedOptions);\n asyncOra.interactive = interactive;\n\n d(`Initializing in: ${dir}`);\n\n if (!template) {\n lintstyle = lintstyle.toLowerCase();\n if (!['airbnb', 'standard'].includes(lintstyle)) {\n d(`Unrecognized lintstyle argument: '${lintstyle}' -- defaulting to 'airbnb'`);\n lintstyle = 'airbnb';\n }\n }\n\n await initDirectory(dir, interactive);\n await initGit(dir);\n await initStarter(dir, template ? undefined : lintstyle);\n await initNPM(dir, template ? undefined : lintstyle);\n if (!template) {\n if (lintstyle === 'standard') {\n await initStandardFix(dir);\n }\n } else {\n await initCustom(dir, template, lintstyle);\n }\n};\n",
717 "static": true,
718 "longname": "/Users/sattard/projects/electron-forge/src/api/init.js",
719 "access": "public",
720 "description": null,
721 "lineNumber": 1
722 },
723 {
724 "__docId__": 54,
725 "kind": "variable",
726 "name": "d",
727 "memberof": "api/init.js",
728 "static": true,
729 "longname": "api/init.js~d",
730 "access": "public",
731 "export": false,
732 "importPath": "electron-forge/dist/api/init",
733 "importStyle": null,
734 "description": null,
735 "lineNumber": 12,
736 "undocument": true,
737 "type": {
738 "types": [
739 "*"
740 ]
741 },
742 "ignore": true
743 },
744 {
745 "__docId__": 55,
746 "kind": "typedef",
747 "name": "InitOptions",
748 "memberof": "api/init.js",
749 "static": true,
750 "longname": "api/init.js~InitOptions",
751 "access": "public",
752 "description": "",
753 "properties": [
754 {
755 "nullable": null,
756 "types": [
757 "string"
758 ],
759 "spread": false,
760 "optional": true,
761 "defaultValue": "process.cwd()",
762 "defaultRaw": "process.cwd()",
763 "name": "dir",
764 "description": "The path to the app to be initialized"
765 },
766 {
767 "nullable": null,
768 "types": [
769 "boolean"
770 ],
771 "spread": false,
772 "optional": true,
773 "defaultValue": "false",
774 "defaultRaw": false,
775 "name": "interactive",
776 "description": "Whether to use sensible defaults or prompt the user visually"
777 },
778 {
779 "nullable": null,
780 "types": [
781 "string"
782 ],
783 "spread": false,
784 "optional": true,
785 "defaultValue": "airbnb",
786 "defaultRaw": "airbnb",
787 "name": "lintstyle",
788 "description": "The lintstyle to pass through to the template creator"
789 },
790 {
791 "nullable": null,
792 "types": [
793 "string"
794 ],
795 "spread": false,
796 "optional": true,
797 "name": "template",
798 "description": "The custom template to use. If left empty, the default template is used"
799 }
800 ],
801 "type": {
802 "types": [
803 "Object"
804 ],
805 "optional": false,
806 "name": "InitOptions"
807 }
808 },
809 {
810 "__docId__": 56,
811 "kind": "function",
812 "name": "init",
813 "memberof": "api/init.js",
814 "generator": false,
815 "async": true,
816 "static": true,
817 "longname": "api/init.js~init",
818 "access": "public",
819 "export": true,
820 "importPath": "electron-forge/dist/api/init",
821 "importStyle": "init",
822 "description": "Initialize a new Electron Forge template project in the given directory.",
823 "lineNumber": 28,
824 "params": [
825 {
826 "nullable": null,
827 "types": [
828 "InitOptions"
829 ],
830 "spread": false,
831 "optional": false,
832 "name": "providedOptions",
833 "description": "Options for the init method"
834 }
835 ],
836 "return": {
837 "nullable": null,
838 "types": [
839 "Promise"
840 ],
841 "spread": false,
842 "description": "Will resolve when the initialization process is complete"
843 }
844 },
845 {
846 "__docId__": 57,
847 "kind": "file",
848 "name": "api/install.js",
849 "content": "import 'colors';\nimport debug from 'debug';\nimport fetch from 'node-fetch';\nimport fs from 'fs-extra';\nimport inquirer from 'inquirer';\nimport nugget from 'nugget';\nimport os from 'os';\nimport path from 'path';\nimport pify from 'pify';\nimport semver from 'semver';\n\nimport asyncOra from '../util/ora-handler';\nimport { info } from '../util/messages';\n\nimport darwinDMGInstaller from '../installers/darwin/dmg';\nimport darwinZipInstaller from '../installers/darwin/zip';\nimport linuxDebInstaller from '../installers/linux/deb';\nimport linuxRPMInstaller from '../installers/linux/rpm';\nimport win32ExeInstaller from '../installers/win32/exe';\n\nconst d = debug('electron-forge:install');\n\nconst GITHUB_API = 'https://api.github.com';\n\n/**\n * @typedef {Object} InstallOptions\n * @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually\n * @property {boolean} [prerelease=false] Whether to install prerelease versions\n * @property {string} repo The GitHub repository to install from, in the format owner/name\n * @property {function} chooseAsset A function that must return the asset to use/install from a provided array of compatible GitHub assets\n */\n\n/**\n * Install an Electron application from GitHub. If you leave interactive as `false`, you MUST provide a `chooseAsset` function.\n *\n * @param {InstallOptions} providedOptions - Options for the install method\n * @return {Promise} Will resolve when the install process is complete\n */\nexport default async (providedOptions = {}) => {\n // eslint-disable-next-line prefer-const, no-unused-vars\n let { interactive, prerelease, repo, chooseAsset } = Object.assign({\n interactive: false,\n prerelease: false,\n }, providedOptions);\n asyncOra.interactive = interactive;\n\n let latestRelease;\n let possibleAssets = [];\n\n await asyncOra('Searching for Application', async (searchSpinner) => {\n if (!repo || repo.indexOf('/') === -1) {\n throw 'Invalid repository name, must be in the format owner/name';\n }\n\n d('searching for repo:', repo);\n let releases;\n try {\n releases = await (await fetch(`${GITHUB_API}/repos/${repo}/releases`)).json();\n } catch (err) {\n // Ignore error\n }\n\n if (!releases || releases.message === 'Not Found' || !Array.isArray(releases)) {\n throw `Failed to find releases for repository \"${repo}\". Please check the name and try again.`;\n }\n\n releases = releases.filter(release => !release.prerelease || prerelease);\n\n const sortedReleases = releases.sort((releaseA, releaseB) => {\n let tagA = releaseA.tag_name;\n if (tagA.substr(0, 1) === 'v') tagA = tagA.substr(1);\n let tagB = releaseB.tag_name;\n if (tagB.substr(0, 1) === 'v') tagB = tagB.substr(1);\n return (semver.gt(tagB, tagA) ? 1 : -1);\n });\n latestRelease = sortedReleases[0];\n\n searchSpinner.text = 'Searching for Releases'; // eslint-disable-line\n\n const assets = latestRelease.assets;\n if (!assets || !Array.isArray(assets)) {\n throw 'Could not find any assets for the latest release';\n }\n\n const installTargets = {\n win32: [/\\.exe$/],\n darwin: [/OSX.*\\.zip$/, /darwin.*\\.zip$/, /macOS.*\\.zip$/, /mac.*\\.zip$/, /\\.dmg$/],\n linux: [/\\.rpm$/, /\\.deb$/],\n };\n\n possibleAssets = assets.filter((asset) => {\n const targetSuffixes = installTargets[process.platform];\n for (const suffix of targetSuffixes) {\n if (suffix.test(asset.name)) return true;\n }\n return false;\n });\n\n if (possibleAssets.length === 0) {\n throw `Failed to find any installable assets for target platform: ${`${process.platform}`.cyan}`;\n }\n });\n\n info(interactive, `Found latest release${prerelease ? ' (including prereleases)' : ''}: ${latestRelease.tag_name.cyan}`);\n\n let targetAsset = possibleAssets[0];\n if (possibleAssets.length > 1) {\n if (chooseAsset) {\n targetAsset = await Promise.resolve(chooseAsset(possibleAssets));\n } else if (interactive) {\n const choices = [];\n possibleAssets.forEach((asset) => {\n choices.push({ name: asset.name, value: asset.id });\n });\n const { assetID } = await inquirer.createPromptModule()({\n type: 'list',\n name: 'assetID',\n message: 'Multiple potential assets found, please choose one from the list below:'.cyan,\n choices,\n });\n\n targetAsset = possibleAssets.find(asset => asset.id === assetID);\n } else {\n throw 'expected a chooseAsset function to be provided but it was not';\n }\n }\n\n const tmpdir = path.resolve(os.tmpdir(), 'forge-install');\n const pathSafeRepo = repo.replace(/[/\\\\]/g, '-');\n const filename = `${pathSafeRepo}-${latestRelease.tag_name}-${targetAsset.name}`;\n\n const fullFilePath = path.resolve(tmpdir, filename);\n if (!await fs.pathExists(fullFilePath) || (await fs.stat(fullFilePath)).size !== targetAsset.size) {\n await fs.mkdirs(tmpdir);\n\n const nuggetOpts = {\n target: filename,\n dir: tmpdir,\n resume: true,\n strictSSL: true,\n };\n await pify(nugget)(targetAsset.browser_download_url, nuggetOpts);\n }\n\n await asyncOra('Installing Application', async (installSpinner) => {\n const installActions = {\n win32: {\n '.exe': win32ExeInstaller,\n },\n darwin: {\n '.zip': darwinZipInstaller,\n '.dmg': darwinDMGInstaller,\n },\n linux: {\n '.deb': linuxDebInstaller,\n '.rpm': linuxRPMInstaller,\n },\n };\n\n const suffixFnIdent = Object.keys(installActions[process.platform]).find(suffix => targetAsset.name.endsWith(suffix));\n await installActions[process.platform][suffixFnIdent](fullFilePath, installSpinner);\n });\n};\n",
850 "static": true,
851 "longname": "/Users/sattard/projects/electron-forge/src/api/install.js",
852 "access": "public",
853 "description": null,
854 "lineNumber": 1
855 },
856 {
857 "__docId__": 58,
858 "kind": "variable",
859 "name": "d",
860 "memberof": "api/install.js",
861 "static": true,
862 "longname": "api/install.js~d",
863 "access": "public",
864 "export": false,
865 "importPath": "electron-forge/dist/api/install",
866 "importStyle": null,
867 "description": null,
868 "lineNumber": 21,
869 "undocument": true,
870 "type": {
871 "types": [
872 "*"
873 ]
874 },
875 "ignore": true
876 },
877 {
878 "__docId__": 59,
879 "kind": "variable",
880 "name": "GITHUB_API",
881 "memberof": "api/install.js",
882 "static": true,
883 "longname": "api/install.js~GITHUB_API",
884 "access": "public",
885 "export": false,
886 "importPath": "electron-forge/dist/api/install",
887 "importStyle": null,
888 "description": null,
889 "lineNumber": 23,
890 "undocument": true,
891 "type": {
892 "types": [
893 "string"
894 ]
895 },
896 "ignore": true
897 },
898 {
899 "__docId__": 60,
900 "kind": "typedef",
901 "name": "InstallOptions",
902 "memberof": "api/install.js",
903 "static": true,
904 "longname": "api/install.js~InstallOptions",
905 "access": "public",
906 "description": "",
907 "properties": [
908 {
909 "nullable": null,
910 "types": [
911 "boolean"
912 ],
913 "spread": false,
914 "optional": true,
915 "defaultValue": "false",
916 "defaultRaw": false,
917 "name": "interactive",
918 "description": "Whether to use sensible defaults or prompt the user visually"
919 },
920 {
921 "nullable": null,
922 "types": [
923 "boolean"
924 ],
925 "spread": false,
926 "optional": true,
927 "defaultValue": "false",
928 "defaultRaw": false,
929 "name": "prerelease",
930 "description": "Whether to install prerelease versions"
931 },
932 {
933 "nullable": null,
934 "types": [
935 "string"
936 ],
937 "spread": false,
938 "optional": false,
939 "name": "repo",
940 "description": "The GitHub repository to install from, in the format owner/name"
941 },
942 {
943 "nullable": null,
944 "types": [
945 "function"
946 ],
947 "spread": false,
948 "optional": false,
949 "name": "chooseAsset",
950 "description": "A function that must return the asset to use/install from a provided array of compatible GitHub assets"
951 }
952 ],
953 "type": {
954 "types": [
955 "Object"
956 ],
957 "optional": false,
958 "name": "InstallOptions"
959 }
960 },
961 {
962 "__docId__": 61,
963 "kind": "function",
964 "name": "install",
965 "memberof": "api/install.js",
966 "generator": false,
967 "async": true,
968 "static": true,
969 "longname": "api/install.js~install",
970 "access": "public",
971 "export": true,
972 "importPath": "electron-forge/dist/api/install",
973 "importStyle": "install",
974 "description": "Install an Electron application from GitHub. If you leave interactive as `false`, you MUST provide a `chooseAsset` function.",
975 "lineNumber": 39,
976 "params": [
977 {
978 "nullable": null,
979 "types": [
980 "InstallOptions"
981 ],
982 "spread": false,
983 "optional": false,
984 "name": "providedOptions",
985 "description": "Options for the install method"
986 }
987 ],
988 "return": {
989 "nullable": null,
990 "types": [
991 "Promise"
992 ],
993 "spread": false,
994 "description": "Will resolve when the install process is complete"
995 }
996 },
997 {
998 "__docId__": 62,
999 "kind": "file",
1000 "name": "api/lint.js",
1001 "content": "import 'colors';\nimport debug from 'debug';\nimport { yarnOrNpmSpawn } from '../util/yarn-or-npm';\n\nimport asyncOra from '../util/ora-handler';\nimport resolveDir from '../util/resolve-dir';\n\nconst d = debug('electron-forge:lint');\n\n/**\n * @typedef {Object} LintOptions\n * @property {string} [dir=process.cwd()] The path to the module to import\n * @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually\n */\n\n/**\n * Lint a local Electron application.\n *\n * The promise will be rejected with the stdout+stderr of the linting process if linting fails or\n * will be resolved if it succeeds.\n *\n * @param {LintOptions} providedOptions - Options for the Lint method\n * @return {Promise<null, string>} Will resolve when the lint process is complete\n */\nexport default async (providedOptions = {}) => {\n // eslint-disable-next-line prefer-const, no-unused-vars\n let { dir, interactive } = Object.assign({\n dir: process.cwd(),\n interactive: false,\n }, providedOptions);\n asyncOra.interactive = interactive;\n\n let success = true;\n let result = null;\n\n await asyncOra('Linting Application', async (lintSpinner) => {\n dir = await resolveDir(dir);\n if (!dir) {\n throw 'Failed to locate lintable Electron application';\n }\n\n d('executing \"run lint -- --color\" in dir:', dir);\n try {\n await yarnOrNpmSpawn(['run', 'lint', '--', '--color'], {\n stdio: process.platform === 'win32' ? 'inherit' : 'pipe',\n cwd: dir,\n });\n } catch (err) {\n lintSpinner.fail();\n success = false;\n result = err;\n }\n });\n\n if (!success) {\n throw result;\n }\n};\n",
1002 "static": true,
1003 "longname": "/Users/sattard/projects/electron-forge/src/api/lint.js",
1004 "access": "public",
1005 "description": null,
1006 "lineNumber": 1
1007 },
1008 {
1009 "__docId__": 63,
1010 "kind": "variable",
1011 "name": "d",
1012 "memberof": "api/lint.js",
1013 "static": true,
1014 "longname": "api/lint.js~d",
1015 "access": "public",
1016 "export": false,
1017 "importPath": "electron-forge/dist/api/lint",
1018 "importStyle": null,
1019 "description": null,
1020 "lineNumber": 8,
1021 "undocument": true,
1022 "type": {
1023 "types": [
1024 "*"
1025 ]
1026 },
1027 "ignore": true
1028 },
1029 {
1030 "__docId__": 64,
1031 "kind": "typedef",
1032 "name": "LintOptions",
1033 "memberof": "api/lint.js",
1034 "static": true,
1035 "longname": "api/lint.js~LintOptions",
1036 "access": "public",
1037 "description": "",
1038 "properties": [
1039 {
1040 "nullable": null,
1041 "types": [
1042 "string"
1043 ],
1044 "spread": false,
1045 "optional": true,
1046 "defaultValue": "process.cwd()",
1047 "defaultRaw": "process.cwd()",
1048 "name": "dir",
1049 "description": "The path to the module to import"
1050 },
1051 {
1052 "nullable": null,
1053 "types": [
1054 "boolean"
1055 ],
1056 "spread": false,
1057 "optional": true,
1058 "defaultValue": "false",
1059 "defaultRaw": false,
1060 "name": "interactive",
1061 "description": "Whether to use sensible defaults or prompt the user visually"
1062 }
1063 ],
1064 "type": {
1065 "types": [
1066 "Object"
1067 ],
1068 "optional": false,
1069 "name": "LintOptions"
1070 }
1071 },
1072 {
1073 "__docId__": 65,
1074 "kind": "function",
1075 "name": "lint",
1076 "memberof": "api/lint.js",
1077 "generator": false,
1078 "async": true,
1079 "static": true,
1080 "longname": "api/lint.js~lint",
1081 "access": "public",
1082 "export": true,
1083 "importPath": "electron-forge/dist/api/lint",
1084 "importStyle": "lint",
1085 "description": "Lint a local Electron application.\n\nThe promise will be rejected with the stdout+stderr of the linting process if linting fails or\nwill be resolved if it succeeds.",
1086 "lineNumber": 25,
1087 "params": [
1088 {
1089 "nullable": null,
1090 "types": [
1091 "LintOptions"
1092 ],
1093 "spread": false,
1094 "optional": false,
1095 "name": "providedOptions",
1096 "description": "Options for the Lint method"
1097 }
1098 ],
1099 "return": {
1100 "nullable": null,
1101 "types": [
1102 "Promise<null, string>"
1103 ],
1104 "spread": false,
1105 "description": "Will resolve when the lint process is complete"
1106 }
1107 },
1108 {
1109 "__docId__": 66,
1110 "kind": "file",
1111 "name": "api/make.js",
1112 "content": "import 'colors';\nimport fs from 'fs-extra';\nimport path from 'path';\n\nimport asyncOra from '../util/ora-handler';\nimport electronHostArch from '../util/electron-host-arch';\nimport getForgeConfig from '../util/forge-config';\nimport runHook from '../util/hook';\nimport { info, warn } from '../util/messages';\nimport readPackageJSON from '../util/read-package-json';\nimport { requireSearchRaw } from '../util/require-search';\nimport resolveDir from '../util/resolve-dir';\n\nimport packager from './package';\n\n/**\n * @typedef {Object} MakeOptions\n * @property {string} [dir=process.cwd()] The path to the app from which distributables are generated\n * @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually\n * @property {boolean} [skipPackage=false] Whether to skip the pre-make packaging step\n * @property {Array<string>} [overrideTargets] An array of make targets to override your forge config\n * @property {string} [arch=host architecture] The target architecture\n * @property {string} [platform=process.platform] The target platform.\n * @property {string} [outDir=`${dir}/out`] The path to the directory containing generated distributables\n */\n\n/**\n * @typedef {Object} MakeResult\n * @property {Array<string>} artifacts An array of paths to artifacts generated for this make run\n * @property {Object} packageJSON The state of the package.json file when the make happened\n * @property {string} platform The platform this make run was for\n * @property {string} arch The arch this make run was for\n */\n\n/**\n * Make distributables for an Electron application.\n *\n * @param {MakeOptions} providedOptions - Options for the make method\n * @return {Promise<Array<MakeResult>>} Will resolve when the make process is complete\n */\nexport default async (providedOptions = {}) => {\n // eslint-disable-next-line prefer-const, no-unused-vars\n let { dir, interactive, skipPackage, overrideTargets, arch, platform } = Object.assign({\n dir: process.cwd(),\n interactive: false,\n skipPackage: false,\n arch: electronHostArch(),\n platform: process.platform,\n }, providedOptions);\n\n const outDir = providedOptions.outDir || path.resolve(dir, 'out');\n asyncOra.interactive = interactive;\n\n let forgeConfig;\n await asyncOra('Resolving Forge Config', async () => {\n dir = await resolveDir(dir);\n if (!dir) {\n throw 'Failed to locate makeable Electron application';\n }\n\n forgeConfig = await getForgeConfig(dir);\n });\n\n if (!['darwin', 'win32', 'linux'].includes(platform)) {\n throw new Error(`'${platform}' is an invalid platform. Choices are 'darwin', 'win32' or 'linux'`);\n }\n\n const makers = {};\n const targets = overrideTargets || forgeConfig.make_targets[platform];\n\n for (const target of targets) {\n const maker = requireSearchRaw(__dirname, [\n `../makers/${platform}/${target}.js`,\n `../makers/generic/${target}.js`,\n `electron-forge-maker-${target}`,\n target,\n path.resolve(dir, target),\n path.resolve(dir, 'node_modules', target),\n ]);\n\n if (!maker) {\n throw new Error([\n 'Could not find a build target with the name: ',\n `${target} for the platform: ${platform}`,\n ].join(''));\n }\n\n if (!maker.isSupportedOnCurrentPlatform) {\n throw new Error([\n `Maker for target ${target} is incompatible with this version of `,\n 'electron-forge, please upgrade or contact the maintainer ',\n '(needs to implement \\'isSupportedOnCurrentPlatform)\\')',\n ].join(''));\n }\n\n if (!await maker.isSupportedOnCurrentPlatform()) {\n throw new Error([\n `Cannot build for ${platform} target ${target}: the maker declared `,\n `that it cannot run on ${process.platform}`,\n ].join(''));\n }\n\n makers[target] = maker.default || maker;\n }\n\n if (!skipPackage) {\n info(interactive, 'We need to package your application before we can make it'.green);\n await packager({\n dir,\n interactive,\n arch,\n platform,\n outDir,\n });\n } else {\n warn(interactive, 'WARNING: Skipping the packaging step, this could result in an out of date build'.red);\n }\n\n const declaredArch = arch;\n\n info(interactive, 'Making for the following targets:', `${targets.join(', ')}`.cyan);\n\n let targetArchs = declaredArch.split(',');\n if (declaredArch === 'all') {\n switch (platform) {\n case 'darwin':\n targetArchs = ['x64'];\n break;\n case 'linux':\n targetArchs = ['ia32', 'x64', 'armv7l'];\n break;\n case 'win32':\n default:\n targetArchs = ['ia32', 'x64'];\n break;\n }\n }\n\n const packageJSON = await readPackageJSON(dir);\n const appName = forgeConfig.electronPackagerConfig.name || packageJSON.productName || packageJSON.name;\n let outputs = [];\n\n await runHook(forgeConfig, 'preMake');\n\n for (const targetArch of targetArchs) {\n const packageDir = path.resolve(outDir, `${appName}-${platform}-${targetArch}`);\n if (!(await fs.pathExists(packageDir))) {\n throw new Error(`Couldn't find packaged app at: ${packageDir}`);\n }\n\n for (const target of targets) {\n const maker = makers[target];\n\n // eslint-disable-next-line no-loop-func\n await asyncOra(`Making for target: ${target.cyan} - On platform: ${platform.cyan} - For arch: ${targetArch.cyan}`, async () => {\n try {\n const artifacts = await maker({\n dir: packageDir,\n appName,\n targetPlatform: platform,\n targetArch,\n forgeConfig,\n packageJSON,\n });\n\n outputs.push({\n artifacts,\n packageJSON,\n platform,\n arch: targetArch,\n });\n } catch (err) {\n if (err) {\n throw {\n message: `An error occured while making for target: ${target}`,\n stack: `${err.message}\\n${err.stack}`,\n };\n } else {\n throw new Error(`An unknown error occured while making for target: ${target}`);\n }\n }\n });\n }\n }\n\n const result = await runHook(forgeConfig, 'postMake', outputs);\n // If the postMake hooks modifies the locations / names of the outputs it must return\n // the new locations so that the publish step knows where to look\n if (Array.isArray(result)) {\n outputs = result;\n }\n\n return outputs;\n};\n",
1113 "static": true,
1114 "longname": "/Users/sattard/projects/electron-forge/src/api/make.js",
1115 "access": "public",
1116 "description": null,
1117 "lineNumber": 1
1118 },
1119 {
1120 "__docId__": 67,
1121 "kind": "typedef",
1122 "name": "MakeOptions",
1123 "memberof": "api/make.js",
1124 "static": true,
1125 "longname": "api/make.js~MakeOptions",
1126 "access": "public",
1127 "description": "",
1128 "properties": [
1129 {
1130 "nullable": null,
1131 "types": [
1132 "string"
1133 ],
1134 "spread": false,
1135 "optional": true,
1136 "defaultValue": "process.cwd()",
1137 "defaultRaw": "process.cwd()",
1138 "name": "dir",
1139 "description": "The path to the app from which distributables are generated"
1140 },
1141 {
1142 "nullable": null,
1143 "types": [
1144 "boolean"
1145 ],
1146 "spread": false,
1147 "optional": true,
1148 "defaultValue": "false",
1149 "defaultRaw": false,
1150 "name": "interactive",
1151 "description": "Whether to use sensible defaults or prompt the user visually"
1152 },
1153 {
1154 "nullable": null,
1155 "types": [
1156 "boolean"
1157 ],
1158 "spread": false,
1159 "optional": true,
1160 "defaultValue": "false",
1161 "defaultRaw": false,
1162 "name": "skipPackage",
1163 "description": "Whether to skip the pre-make packaging step"
1164 },
1165 {
1166 "nullable": null,
1167 "types": [
1168 "Array<string>"
1169 ],
1170 "spread": false,
1171 "optional": true,
1172 "name": "overrideTargets",
1173 "description": "An array of make targets to override your forge config"
1174 },
1175 {
1176 "nullable": null,
1177 "types": [
1178 "string"
1179 ],
1180 "spread": false,
1181 "optional": true,
1182 "defaultValue": "host architecture",
1183 "defaultRaw": "host architecture",
1184 "name": "arch",
1185 "description": "The target architecture"
1186 },
1187 {
1188 "nullable": null,
1189 "types": [
1190 "string"
1191 ],
1192 "spread": false,
1193 "optional": true,
1194 "defaultValue": "process.platform",
1195 "defaultRaw": "process.platform",
1196 "name": "platform",
1197 "description": "The target platform."
1198 },
1199 {
1200 "nullable": null,
1201 "types": [
1202 "string"
1203 ],
1204 "spread": false,
1205 "optional": true,
1206 "defaultValue": "`${dir}/out`",
1207 "defaultRaw": "`${dir}/out`",
1208 "name": "outDir",
1209 "description": "The path to the directory containing generated distributables"
1210 }
1211 ],
1212 "type": {
1213 "types": [
1214 "Object"
1215 ],
1216 "optional": false,
1217 "name": "MakeOptions"
1218 }
1219 },
1220 {
1221 "__docId__": 68,
1222 "kind": "typedef",
1223 "name": "MakeResult",
1224 "memberof": "api/make.js",
1225 "static": true,
1226 "longname": "api/make.js~MakeResult",
1227 "access": "public",
1228 "description": "",
1229 "properties": [
1230 {
1231 "nullable": null,
1232 "types": [
1233 "Array<string>"
1234 ],
1235 "spread": false,
1236 "optional": false,
1237 "name": "artifacts",
1238 "description": "An array of paths to artifacts generated for this make run"
1239 },
1240 {
1241 "nullable": null,
1242 "types": [
1243 "Object"
1244 ],
1245 "spread": false,
1246 "optional": false,
1247 "name": "packageJSON",
1248 "description": "The state of the package.json file when the make happened"
1249 },
1250 {
1251 "nullable": null,
1252 "types": [
1253 "string"
1254 ],
1255 "spread": false,
1256 "optional": false,
1257 "name": "platform",
1258 "description": "The platform this make run was for"
1259 },
1260 {
1261 "nullable": null,
1262 "types": [
1263 "string"
1264 ],
1265 "spread": false,
1266 "optional": false,
1267 "name": "arch",
1268 "description": "The arch this make run was for"
1269 }
1270 ],
1271 "type": {
1272 "types": [
1273 "Object"
1274 ],
1275 "optional": false,
1276 "name": "MakeResult"
1277 }
1278 },
1279 {
1280 "__docId__": 69,
1281 "kind": "function",
1282 "name": "make",
1283 "memberof": "api/make.js",
1284 "generator": false,
1285 "async": true,
1286 "static": true,
1287 "longname": "api/make.js~make",
1288 "access": "public",
1289 "export": true,
1290 "importPath": "electron-forge/dist/api/make",
1291 "importStyle": "make",
1292 "description": "Make distributables for an Electron application.",
1293 "lineNumber": 41,
1294 "params": [
1295 {
1296 "nullable": null,
1297 "types": [
1298 "MakeOptions"
1299 ],
1300 "spread": false,
1301 "optional": false,
1302 "name": "providedOptions",
1303 "description": "Options for the make method"
1304 }
1305 ],
1306 "return": {
1307 "nullable": null,
1308 "types": [
1309 "Promise<Array<MakeResult>>"
1310 ],
1311 "spread": false,
1312 "description": "Will resolve when the make process is complete"
1313 }
1314 },
1315 {
1316 "__docId__": 70,
1317 "kind": "file",
1318 "name": "api/package.js",
1319 "content": "import 'colors';\nimport debug from 'debug';\nimport fs from 'fs-extra';\nimport glob from 'glob';\nimport path from 'path';\nimport pify from 'pify';\nimport packager from 'electron-packager';\n\nimport electronHostArch from '../util/electron-host-arch';\nimport getForgeConfig from '../util/forge-config';\nimport runHook from '../util/hook';\nimport realOra, { fakeOra } from '../util/ora';\nimport packagerCompileHook from '../util/compile-hook';\nimport readPackageJSON from '../util/read-package-json';\nimport rebuildHook from '../util/rebuild';\nimport requireSearch from '../util/require-search';\nimport resolveDir from '../util/resolve-dir';\n\nconst d = debug('electron-forge:packager');\n\n/**\n * @typedef {Object} PackageOptions\n * @property {string} [dir=process.cwd()] The path to the app to package\n * @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually\n * @property {string} [arch=process.arch] The target arch\n * @property {string} [platform=process.platform] The target platform.\n * @property {string} [outDir=`${dir}/out`] The path to the output directory for packaged apps\n */\n\n/**\n * Package an Electron application into an platform dependent format.\n *\n * @param {PackageOptions} providedOptions - Options for the Package method\n * @return {Promise} Will resolve when the package process is complete\n */\nexport default async (providedOptions = {}) => {\n // eslint-disable-next-line prefer-const, no-unused-vars\n let { dir, interactive, arch, platform } = Object.assign({\n dir: process.cwd(),\n interactive: false,\n arch: electronHostArch(),\n platform: process.platform,\n }, providedOptions);\n\n const ora = interactive ? realOra : fakeOra;\n\n const outDir = providedOptions.outDir || path.resolve(dir, 'out');\n let prepareSpinner = ora(`Preparing to Package Application for arch: ${(arch === 'all' ? 'ia32' : arch).cyan}`).start();\n let prepareCounter = 0;\n\n dir = await resolveDir(dir);\n if (!dir) {\n throw 'Failed to locate compilable Electron application';\n }\n\n const packageJSON = await readPackageJSON(dir);\n\n if (path.dirname(require.resolve(path.resolve(dir, packageJSON.main))) === dir) {\n console.error(`Entry point: ${packageJSON.main}`.red);\n throw 'The entry point to your application (\"packageJSON.main\") must be in a subfolder not in the top level directory';\n }\n\n const forgeConfig = await getForgeConfig(dir);\n let packagerSpinner;\n\n const packageOpts = Object.assign({\n asar: false,\n overwrite: true,\n }, forgeConfig.electronPackagerConfig, {\n afterCopy: [async (buildPath, electronVersion, pPlatform, pArch, done) => {\n if (packagerSpinner) {\n packagerSpinner.succeed();\n prepareCounter += 1;\n prepareSpinner = ora(`Preparing to Package Application for arch: ${(prepareCounter === 2 ? 'armv7l' : 'x64').cyan}`).start();\n }\n await fs.remove(path.resolve(buildPath, 'node_modules/electron-compile/test'));\n const bins = await pify(glob)(path.join(buildPath, '**/.bin/**/*'));\n for (const bin of bins) {\n await fs.remove(bin);\n }\n done();\n }, async (...args) => {\n prepareSpinner.succeed();\n await packagerCompileHook(dir, ...args);\n }, async (buildPath, electronVersion, pPlatform, pArch, done) => {\n await rebuildHook(buildPath, electronVersion, pPlatform, pArch);\n packagerSpinner = ora('Packaging Application').start();\n done();\n }, async (buildPath, electronVersion, pPlatform, pArch, done) => {\n const copiedPackageJSON = await readPackageJSON(buildPath);\n if (copiedPackageJSON.config && copiedPackageJSON.config.forge) {\n delete copiedPackageJSON.config.forge;\n }\n await fs.writeFile(path.resolve(buildPath, 'package.json'), JSON.stringify(copiedPackageJSON, null, 2));\n done();\n }].concat(forgeConfig.electronPackagerConfig.afterCopy ? forgeConfig.electronPackagerConfig.afterCopy.map(item =>\n (typeof item === 'string' ? requireSearch(dir, [item]) : item)\n ) : []),\n afterExtract: forgeConfig.electronPackagerConfig.afterExtract ? forgeConfig.electronPackagerConfig.afterExtract.map(item =>\n (typeof item === 'string' ? requireSearch(dir, [item]) : item)\n ) : [],\n dir,\n arch,\n platform,\n out: outDir,\n electronVersion: packageJSON.devDependencies['electron-prebuilt-compile'],\n });\n packageOpts.quiet = true;\n if (typeof packageOpts.asar === 'object' && packageOpts.asar.unpack) {\n packagerSpinner.fail();\n throw new Error('electron-compile does not support asar.unpack yet. Please use asar.unpackDir');\n }\n\n await runHook(forgeConfig, 'generateAssets');\n await runHook(forgeConfig, 'prePackage');\n\n d('packaging with options', packageOpts);\n\n await packager(packageOpts);\n\n await runHook(forgeConfig, 'postPackage');\n\n packagerSpinner.succeed();\n};\n",
1320 "static": true,
1321 "longname": "/Users/sattard/projects/electron-forge/src/api/package.js",
1322 "access": "public",
1323 "description": null,
1324 "lineNumber": 1
1325 },
1326 {
1327 "__docId__": 71,
1328 "kind": "variable",
1329 "name": "d",
1330 "memberof": "api/package.js",
1331 "static": true,
1332 "longname": "api/package.js~d",
1333 "access": "public",
1334 "export": false,
1335 "importPath": "electron-forge/dist/api/package",
1336 "importStyle": null,
1337 "description": null,
1338 "lineNumber": 19,
1339 "undocument": true,
1340 "type": {
1341 "types": [
1342 "*"
1343 ]
1344 },
1345 "ignore": true
1346 },
1347 {
1348 "__docId__": 72,
1349 "kind": "typedef",
1350 "name": "PackageOptions",
1351 "memberof": "api/package.js",
1352 "static": true,
1353 "longname": "api/package.js~PackageOptions",
1354 "access": "public",
1355 "description": "",
1356 "properties": [
1357 {
1358 "nullable": null,
1359 "types": [
1360 "string"
1361 ],
1362 "spread": false,
1363 "optional": true,
1364 "defaultValue": "process.cwd()",
1365 "defaultRaw": "process.cwd()",
1366 "name": "dir",
1367 "description": "The path to the app to package"
1368 },
1369 {
1370 "nullable": null,
1371 "types": [
1372 "boolean"
1373 ],
1374 "spread": false,
1375 "optional": true,
1376 "defaultValue": "false",
1377 "defaultRaw": false,
1378 "name": "interactive",
1379 "description": "Whether to use sensible defaults or prompt the user visually"
1380 },
1381 {
1382 "nullable": null,
1383 "types": [
1384 "string"
1385 ],
1386 "spread": false,
1387 "optional": true,
1388 "defaultValue": "process.arch",
1389 "defaultRaw": "process.arch",
1390 "name": "arch",
1391 "description": "The target arch"
1392 },
1393 {
1394 "nullable": null,
1395 "types": [
1396 "string"
1397 ],
1398 "spread": false,
1399 "optional": true,
1400 "defaultValue": "process.platform",
1401 "defaultRaw": "process.platform",
1402 "name": "platform",
1403 "description": "The target platform."
1404 },
1405 {
1406 "nullable": null,
1407 "types": [
1408 "string"
1409 ],
1410 "spread": false,
1411 "optional": true,
1412 "defaultValue": "`${dir}/out`",
1413 "defaultRaw": "`${dir}/out`",
1414 "name": "outDir",
1415 "description": "The path to the output directory for packaged apps"
1416 }
1417 ],
1418 "type": {
1419 "types": [
1420 "Object"
1421 ],
1422 "optional": false,
1423 "name": "PackageOptions"
1424 }
1425 },
1426 {
1427 "__docId__": 73,
1428 "kind": "function",
1429 "name": "package",
1430 "memberof": "api/package.js",
1431 "generator": false,
1432 "async": true,
1433 "static": true,
1434 "longname": "api/package.js~package",
1435 "access": "public",
1436 "export": true,
1437 "importPath": "electron-forge/dist/api/package",
1438 "importStyle": "package",
1439 "description": "Package an Electron application into an platform dependent format.",
1440 "lineNumber": 36,
1441 "params": [
1442 {
1443 "nullable": null,
1444 "types": [
1445 "PackageOptions"
1446 ],
1447 "spread": false,
1448 "optional": false,
1449 "name": "providedOptions",
1450 "description": "Options for the Package method"
1451 }
1452 ],
1453 "return": {
1454 "nullable": null,
1455 "types": [
1456 "Promise"
1457 ],
1458 "spread": false,
1459 "description": "Will resolve when the package process is complete"
1460 }
1461 },
1462 {
1463 "__docId__": 74,
1464 "kind": "file",
1465 "name": "api/publish.js",
1466 "content": "import 'colors';\nimport debug from 'debug';\nimport fs from 'fs-extra';\nimport path from 'path';\n\nimport asyncOra from '../util/ora-handler';\nimport deprecate from '../util/deprecate';\nimport getForgeConfig from '../util/forge-config';\nimport readPackageJSON from '../util/read-package-json';\nimport requireSearch from '../util/require-search';\nimport resolveDir from '../util/resolve-dir';\nimport PublishState from '../util/publish-state';\n\nimport make from './make';\n\nconst d = debug('electron-forge:publish');\n\n/**\n * @typedef {Object} PublishOptions\n * @property {string} [dir=process.cwd()] The path to the app to be published\n * @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually\n * @property {string} [authToken] An authentication token to use when publishing\n * @property {string} [tag=packageJSON.version] The string to tag this release with\n * @property {string} [target=github] The publish target\n * @property {MakeOptions} [makeOptions] Options object to passed through to make()\n * @property {string} [outDir=`${dir}/out`] The path to the directory containing generated distributables\n * @property {boolean} [dryRun=false] Whether or not to generate dry run meta data and not actually publish\n * @property {boolean} [dryRunResume=false] Whether or not to attempt to resume a previously saved dryRun and publish\n * @property {Object} [makeResults=null] Provide results from make so that the publish step doesn't run make itself\n */\n\n/**\n * Publish an Electron application into the given target service.\n *\n * @param {PublishOptions} providedOptions - Options for the Publish method\n * @return {Promise} Will resolve when the publish process is complete\n */\nconst publish = async (providedOptions = {}) => {\n // eslint-disable-next-line prefer-const, no-unused-vars\n let { dir, interactive, authToken, tag, target, makeOptions, dryRun, dryRunResume, makeResults } = Object.assign({\n dir: process.cwd(),\n interactive: false,\n tag: null,\n makeOptions: {},\n target: null,\n dryRun: false,\n dryRunResume: false,\n makeResults: null,\n }, providedOptions);\n asyncOra.interactive = interactive;\n // FIXME(MarshallOfSound): Change the method param to publishTargets in the next major bump\n let publishTargets = target;\n\n const outDir = providedOptions.outDir || path.resolve(dir, 'out');\n const dryRunDir = path.resolve(outDir, 'publish-dry-run');\n\n if (dryRun && dryRunResume) {\n throw 'Can\\'t dry run and resume a dry run at the same time';\n }\n if (dryRunResume && makeResults) {\n throw 'Can\\'t resume a dry run and use the provided makeResults at the same time';\n }\n\n let packageJSON = await readPackageJSON(dir);\n\n const forgeConfig = await getForgeConfig(dir);\n\n if (dryRunResume) {\n d('attempting to resume from dry run');\n const publishes = await PublishState.loadFromDirectory(dryRunDir);\n for (const publishStates of publishes) {\n d('publishing for given state set');\n await publish({\n dir,\n interactive,\n authToken,\n tag,\n target,\n makeOptions,\n dryRun: false,\n dryRunResume: false,\n makeResults: publishStates.map(({ state }) => state),\n });\n }\n return;\n } else if (!makeResults) {\n d('triggering make');\n makeResults = await make(Object.assign({\n dir,\n interactive,\n }, makeOptions));\n } else {\n // Restore values from dry run\n d('restoring publish settings from dry run');\n\n for (const makeResult of makeResults) {\n packageJSON = makeResult.packageJSON;\n makeOptions.platform = makeResult.platform;\n makeOptions.arch = makeResult.arch;\n\n for (const makePath of makeResult.artifacts) {\n if (!await fs.exists(makePath)) {\n throw `Attempted to resume a dry run but an artifact (${makePath}) could not be found`;\n }\n }\n }\n }\n\n if (dryRun) {\n d('saving results of make in dry run state', makeResults);\n await fs.remove(dryRunDir);\n await PublishState.saveToDirectory(dryRunDir, makeResults);\n return;\n }\n\n dir = await resolveDir(dir);\n if (!dir) {\n throw 'Failed to locate publishable Electron application';\n }\n\n const artifacts = makeResults.reduce((accum, makeResult) => {\n accum.push(...makeResult.artifacts);\n return accum;\n }, []);\n\n if (publishTargets === null) {\n publishTargets = forgeConfig.publish_targets[makeOptions.platform || process.platform];\n } else if (typeof publishTargets === 'string') {\n // FIXME(MarshallOfSound): Remove this fallback string typeof check in the next major bump\n deprecate('publish target as a string').replaceWith('an array of publish targets');\n publishTargets = [publishTargets];\n }\n\n for (const publishTarget of publishTargets) {\n let publisher;\n await asyncOra(`Resolving publish target: ${`${publishTarget}`.cyan}`, async () => { // eslint-disable-line no-loop-func\n publisher = requireSearch(__dirname, [\n `../publishers/${publishTarget}.js`,\n `electron-forge-publisher-${publishTarget}`,\n publishTarget,\n path.resolve(dir, publishTarget),\n path.resolve(dir, 'node_modules', publishTarget),\n ]);\n if (!publisher) {\n throw `Could not find a publish target with the name: ${publishTarget}`;\n }\n });\n\n await publisher(artifacts, packageJSON, forgeConfig, authToken, tag, makeOptions.platform || process.platform, makeOptions.arch || process.arch);\n }\n};\n\nexport default publish;\n",
1467 "static": true,
1468 "longname": "/Users/sattard/projects/electron-forge/src/api/publish.js",
1469 "access": "public",
1470 "description": null,
1471 "lineNumber": 1
1472 },
1473 {
1474 "__docId__": 75,
1475 "kind": "variable",
1476 "name": "d",
1477 "memberof": "api/publish.js",
1478 "static": true,
1479 "longname": "api/publish.js~d",
1480 "access": "public",
1481 "export": false,
1482 "importPath": "electron-forge/dist/api/publish",
1483 "importStyle": null,
1484 "description": null,
1485 "lineNumber": 16,
1486 "undocument": true,
1487 "type": {
1488 "types": [
1489 "*"
1490 ]
1491 },
1492 "ignore": true
1493 },
1494 {
1495 "__docId__": 76,
1496 "kind": "typedef",
1497 "name": "PublishOptions",
1498 "memberof": "api/publish.js",
1499 "static": true,
1500 "longname": "api/publish.js~PublishOptions",
1501 "access": "public",
1502 "description": "",
1503 "properties": [
1504 {
1505 "nullable": null,
1506 "types": [
1507 "string"
1508 ],
1509 "spread": false,
1510 "optional": true,
1511 "defaultValue": "process.cwd()",
1512 "defaultRaw": "process.cwd()",
1513 "name": "dir",
1514 "description": "The path to the app to be published"
1515 },
1516 {
1517 "nullable": null,
1518 "types": [
1519 "boolean"
1520 ],
1521 "spread": false,
1522 "optional": true,
1523 "defaultValue": "false",
1524 "defaultRaw": false,
1525 "name": "interactive",
1526 "description": "Whether to use sensible defaults or prompt the user visually"
1527 },
1528 {
1529 "nullable": null,
1530 "types": [
1531 "string"
1532 ],
1533 "spread": false,
1534 "optional": true,
1535 "name": "authToken",
1536 "description": "An authentication token to use when publishing"
1537 },
1538 {
1539 "nullable": null,
1540 "types": [
1541 "string"
1542 ],
1543 "spread": false,
1544 "optional": true,
1545 "defaultValue": "packageJSON.version",
1546 "defaultRaw": "packageJSON.version",
1547 "name": "tag",
1548 "description": "The string to tag this release with"
1549 },
1550 {
1551 "nullable": null,
1552 "types": [
1553 "string"
1554 ],
1555 "spread": false,
1556 "optional": true,
1557 "defaultValue": "github",
1558 "defaultRaw": "github",
1559 "name": "target",
1560 "description": "The publish target"
1561 },
1562 {
1563 "nullable": null,
1564 "types": [
1565 "MakeOptions"
1566 ],
1567 "spread": false,
1568 "optional": true,
1569 "name": "makeOptions",
1570 "description": "Options object to passed through to make()"
1571 },
1572 {
1573 "nullable": null,
1574 "types": [
1575 "string"
1576 ],
1577 "spread": false,
1578 "optional": true,
1579 "defaultValue": "`${dir}/out`",
1580 "defaultRaw": "`${dir}/out`",
1581 "name": "outDir",
1582 "description": "The path to the directory containing generated distributables"
1583 },
1584 {
1585 "nullable": null,
1586 "types": [
1587 "boolean"
1588 ],
1589 "spread": false,
1590 "optional": true,
1591 "defaultValue": "false",
1592 "defaultRaw": false,
1593 "name": "dryRun",
1594 "description": "Whether or not to generate dry run meta data and not actually publish"
1595 },
1596 {
1597 "nullable": null,
1598 "types": [
1599 "boolean"
1600 ],
1601 "spread": false,
1602 "optional": true,
1603 "defaultValue": "false",
1604 "defaultRaw": false,
1605 "name": "dryRunResume",
1606 "description": "Whether or not to attempt to resume a previously saved dryRun and publish"
1607 },
1608 {
1609 "nullable": null,
1610 "types": [
1611 "Object"
1612 ],
1613 "spread": false,
1614 "optional": true,
1615 "defaultValue": "null",
1616 "defaultRaw": null,
1617 "name": "makeResults",
1618 "description": "Provide results from make so that the publish step doesn't run make itself"
1619 }
1620 ],
1621 "type": {
1622 "types": [
1623 "Object"
1624 ],
1625 "optional": false,
1626 "name": "PublishOptions"
1627 }
1628 },
1629 {
1630 "__docId__": 77,
1631 "kind": "function",
1632 "name": "publish",
1633 "memberof": "api/publish.js",
1634 "generator": false,
1635 "async": true,
1636 "static": true,
1637 "longname": "api/publish.js~publish",
1638 "access": "public",
1639 "export": true,
1640 "importPath": "electron-forge/dist/api/publish",
1641 "importStyle": "publish",
1642 "description": "Publish an Electron application into the given target service.",
1643 "lineNumber": 38,
1644 "params": [
1645 {
1646 "nullable": null,
1647 "types": [
1648 "PublishOptions"
1649 ],
1650 "spread": false,
1651 "optional": false,
1652 "name": "providedOptions",
1653 "description": "Options for the Publish method"
1654 }
1655 ],
1656 "return": {
1657 "nullable": null,
1658 "types": [
1659 "Promise"
1660 ],
1661 "spread": false,
1662 "description": "Will resolve when the publish process is complete"
1663 }
1664 },
1665 {
1666 "__docId__": 78,
1667 "kind": "file",
1668 "name": "api/start.js",
1669 "content": "import 'colors';\nimport { spawn } from 'child_process';\nimport path from 'path';\n\nimport asyncOra from '../util/ora-handler';\nimport readPackageJSON from '../util/read-package-json';\nimport rebuild from '../util/rebuild';\nimport resolveDir from '../util/resolve-dir';\nimport getForgeConfig from '../util/forge-config';\nimport runHook from '../util/hook';\n\n/**\n * @typedef {Object} StartOptions\n * @property {string} [dir=process.cwd()] The path to the electron forge project to run\n * @property {string} [appPath='.'] The path (relative to dir) to the electron app to run relative to the project directory\n * @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually\n * @property {boolean} [enableLogging=false] Enables advanced internal Electron debug calls\n * @property {Array<string>} [args] Arguments to pass through to the launched Electron application\n */\n\n/**\n * Start an Electron application.\n *\n * @param {StartOptions} providedOptions - Options for the Publish method\n * @return {Promise} Will resolve when the application is launched\n */\nexport default async (providedOptions = {}) => {\n // eslint-disable-next-line prefer-const, no-unused-vars\n let { dir, interactive, enableLogging, appPath, args, runAsNode, inspect } = Object.assign({\n dir: process.cwd(),\n appPath: '.',\n interactive: false,\n enableLogging: false,\n args: [],\n runAsNode: false,\n inspect: false,\n }, providedOptions);\n asyncOra.interactive = interactive;\n\n await asyncOra('Locating Application', async () => {\n dir = await resolveDir(dir);\n if (!dir) {\n throw 'Failed to locate startable Electron application';\n }\n });\n\n const packageJSON = await readPackageJSON(dir);\n\n await rebuild(dir, packageJSON.devDependencies['electron-prebuilt-compile'], process.platform, process.arch);\n\n const spawnOpts = {\n cwd: dir,\n stdio: 'inherit',\n env: Object.assign({}, process.env, enableLogging ? {\n ELECTRON_ENABLE_LOGGING: true,\n ELECTRON_ENABLE_STACK_DUMPING: true,\n } : {}),\n };\n\n if (runAsNode) {\n spawnOpts.env.ELECTRON_RUN_AS_NODE = true;\n } else {\n delete spawnOpts.env.ELECTRON_RUN_AS_NODE;\n }\n\n if (inspect) {\n args = ['--inspect'].concat(args);\n }\n\n let spawned;\n\n const forgeConfig = await getForgeConfig(dir);\n await runHook(forgeConfig, 'generateAssets');\n\n await asyncOra('Launching Application', async () => {\n spawned = spawn(process.execPath, [path.resolve(dir, 'node_modules/electron-prebuilt-compile/lib/cli'), appPath].concat(args), spawnOpts);\n });\n\n return spawned;\n};\n",
1670 "static": true,
1671 "longname": "/Users/sattard/projects/electron-forge/src/api/start.js",
1672 "access": "public",
1673 "description": null,
1674 "lineNumber": 1
1675 },
1676 {
1677 "__docId__": 79,
1678 "kind": "typedef",
1679 "name": "StartOptions",
1680 "memberof": "api/start.js",
1681 "static": true,
1682 "longname": "api/start.js~StartOptions",
1683 "access": "public",
1684 "description": "",
1685 "properties": [
1686 {
1687 "nullable": null,
1688 "types": [
1689 "string"
1690 ],
1691 "spread": false,
1692 "optional": true,
1693 "defaultValue": "process.cwd()",
1694 "defaultRaw": "process.cwd()",
1695 "name": "dir",
1696 "description": "The path to the electron forge project to run"
1697 },
1698 {
1699 "nullable": null,
1700 "types": [
1701 "string"
1702 ],
1703 "spread": false,
1704 "optional": true,
1705 "defaultValue": "'.'",
1706 "defaultRaw": "'.'",
1707 "name": "appPath",
1708 "description": "The path (relative to dir) to the electron app to run relative to the project directory"
1709 },
1710 {
1711 "nullable": null,
1712 "types": [
1713 "boolean"
1714 ],
1715 "spread": false,
1716 "optional": true,
1717 "defaultValue": "false",
1718 "defaultRaw": false,
1719 "name": "interactive",
1720 "description": "Whether to use sensible defaults or prompt the user visually"
1721 },
1722 {
1723 "nullable": null,
1724 "types": [
1725 "boolean"
1726 ],
1727 "spread": false,
1728 "optional": true,
1729 "defaultValue": "false",
1730 "defaultRaw": false,
1731 "name": "enableLogging",
1732 "description": "Enables advanced internal Electron debug calls"
1733 },
1734 {
1735 "nullable": null,
1736 "types": [
1737 "Array<string>"
1738 ],
1739 "spread": false,
1740 "optional": true,
1741 "name": "args",
1742 "description": "Arguments to pass through to the launched Electron application"
1743 }
1744 ],
1745 "type": {
1746 "types": [
1747 "Object"
1748 ],
1749 "optional": false,
1750 "name": "StartOptions"
1751 }
1752 },
1753 {
1754 "__docId__": 80,
1755 "kind": "function",
1756 "name": "start",
1757 "memberof": "api/start.js",
1758 "generator": false,
1759 "async": true,
1760 "static": true,
1761 "longname": "api/start.js~start",
1762 "access": "public",
1763 "export": true,
1764 "importPath": "electron-forge/dist/api/start",
1765 "importStyle": "start",
1766 "description": "Start an Electron application.",
1767 "lineNumber": 27,
1768 "params": [
1769 {
1770 "nullable": null,
1771 "types": [
1772 "StartOptions"
1773 ],
1774 "spread": false,
1775 "optional": false,
1776 "name": "providedOptions",
1777 "description": "Options for the Publish method"
1778 }
1779 ],
1780 "return": {
1781 "nullable": null,
1782 "types": [
1783 "Promise"
1784 ],
1785 "spread": false,
1786 "description": "Will resolve when the application is launched"
1787 }
1788 },
1789 {
1790 "kind": "index",
1791 "content": "Electron Forge\n--------------\n[![Linux/macOS Build Status](https://travis-ci.org/electron-userland/electron-forge.svg?branch=master)](https://travis-ci.org/electron-userland/electron-forge)\n[![Windows Build status](https://ci.appveyor.com/api/projects/status/79ae80nek1eucyy3?svg=true)](https://ci.appveyor.com/project/electron-userland/electron-forge)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![npm version](https://badge.fury.io/js/electron-forge.svg)](https://www.npmjs.com/package/electron-forge)\n[![npm](https://img.shields.io/npm/dt/electron-forge.svg?maxAge=2592000)](https://www.npmjs.com/package/electron-forge)\n[![license](https://img.shields.io/github/license/electron-userland/electron-forge.svg)](https://github.com/electron-userland/electron-forge/blob/master/LICENSE)\n![status](https://img.shields.io/badge/Status-%20Ready%20for%20Awesome-red.svg)\n\nA complete tool for building modern Electron applications.\n\nElectron Forge unifies the existing (and well maintained) build tools for\nElectron development into a simple, easy to use package so that anyone can\njump right in to Electron development.\n\n# Getting Started\n\n**Note**: Electron Forge requires Node 6 or above, plus git installed.\n\n```bash\nnpm install -g electron-forge\nelectron-forge init my-new-app\ncd my-new-app\nnpm start\n```\n\nAlternatively, if you have a more recent version of `npm` or `yarn`, you can use\n[`npx`](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b),\nor\n[`yarn create`](https://yarnpkg.com/blog/2017/05/12/introducing-yarn/).\n\n```bash\nnpx electron-forge init my-new-app\n# or\nyarn create electron-app my-new-app\n\n# then\ncd my-new-app\nnpm start\n```\n\n# Project Goals\n\n1. Starting with Electron should be as simple as a single command.\n2. Developers shouldn't have to worry about `babel`, `browserify`, `webpack`,\n native module rebuilding, etc. Everything should \"just work\" for them out\n of the box.\n3. Everything from creating the project to packaging the project for release\n should be handled by one dependency in a standard way while still offering\n users maximum choice and freedom.\n\nWith these goals in mind, under the hood this project uses, among others:\n\n* [`electron-compile`](https://github.com/electron/electron-compile): a tool\n that lets you use modern and futuristic languages inside Electron without\n worrying about transpiling or build tooling.\n* [`electron-rebuild`](https://github.com/electron/electron-rebuild):\n Automatically recompiles native Node.js modules against the correct\n Electron version.\n* [Electron Packager](https://github.com/electron-userland/electron-packager):\n Customizes and bundles your Electron app to get it ready for distribution.\n\n# Usage\n\n## Starting a new Project\n\n```bash\nnpm install -g electron-forge\nelectron-forge init my-new-project\n```\n\nThis command will generate a brand new project folder and install all your Node\nmodule dependencies, so you will be all set to go. By default we will also\ninstall the `airbnb` linting modules. If you want to follow the `standard`\nlinting rules instead, use the `--lintstyle=standard` argument.\n\nYou can also start a project with your\n[favorite framework](https://electronforge.io/templates) with the `--template`\nargument. E.g. `--template=react`.\n\n## Importing an existing Project\n\n```bash\nelectron-forge import existing-project-directory\n```\n\nGiven an existing Electron project, this command will attempt to interactively\nnavigate through the process of importing it to the Electron Forge format, so\nthe commands listed below can be used. This includes being prompted to remove\nexisting Electron build tools in favor of Electron Forge equivalents.\n\n## Launching your Project\n\n```bash\nelectron-forge start\n```\n\nAny arguments after \"start\" will be passed through to your application when\nit's launched.\n\n## Packaging your Project\n\n```bash\nelectron-forge package\n```\n\nYes, it really is that simple. If you want to specify platform / arch, use the\n`--platform=<platform>` and `--arch=<arch>` arguments.\n\n## Generating a distributable for your Project\n\n```bash\nelectron-forge make\n```\n\nThis will generate platform specific distributables (installers, distribution\npackages, etc.) for you. Note that you can only generate distributables for your\ncurrent platform.\n\n## Linting your Project\n\n```bash\nelectron-forge lint\n```\n\n## Publishing your Project\n\n```bash\nelectron-forge publish\n```\n\nThis will `make` your project and publish any generated artifacts. By default it will publish to GitHub but you can change the publish target with `--target=YourTarget`.\n\n# Config\n\nOnce you have generated a project, your `package.json` file will have some\ndefault `forge` configuration. Below is the reference structure for this\nconfig object:\n\n```javascript\n{\n \"make_targets\": {\n \"win32\": [\"squirrel\"], // An array of win32 make targets\n \"darwin\": [\"zip\", \"dmg\"], // An array of darwin make targets\n \"linux\": [\"deb\", \"rpm\", \"flatpak\"] // An array of linux make targets\n },\n \"electronPackagerConfig\": {},\n \"electronWinstallerConfig\": {},\n \"electronInstallerDMG\": {},\n \"electronInstallerFlatpak\": {},\n \"electronInstallerDebian\": {},\n \"electronInstallerRedhat\": {}\n}\n```\n\n## Possible `make` targets\n\n| Target Name | Available Platforms | Description | Configurable Options | Default? | Requirements |\n|-------------|---------------------|-------------|----------------------|----------|--------------|\n| `zip` | All | Zips your packaged application | None | Yes | `zip` on Darwin/Linux |\n| `squirrel` | Windows | Generates an installer and `.nupkg` files for Squirrel.Windows | [`electronWinstallerConfig`](https://github.com/electron/windows-installer#usage) | Yes | |\n| `appx` | Windows | Generates a Windows Store package | [`windowsStoreConfig`](https://github.com/felixrieseberg/electron-windows-store#programmatic-usage) | No | |\n| `dmg` | Darwin | Generates a DMG file | [`electronInstallerDMG`](https://github.com/mongodb-js/electron-installer-dmg#api) | No | |\n| `deb` | Linux | Generates a Debian package | [`electronInstallerDebian`](https://github.com/unindented/electron-installer-debian#options) | Yes | [`fakeroot` and `dpkg`](https://github.com/unindented/electron-installer-debian#requirements) |\n| `rpm` | Linux | Generates an RPM package | [`electronInstallerRedhat`](https://github.com/unindented/electron-installer-redhat#options) | Yes | [`rpm`](https://github.com/unindented/electron-installer-redhatn#requirements) |\n| `flatpak` | Linux | Generates a [Flatpak](http://flatpak.org/) file | [`electronInstallerFlatpak`](https://github.com/endlessm/electron-installer-flatpak#options) | No | [`flatpak-builder`](https://github.com/endlessm/electron-installer-flatpak#requirements) |\n\n## Configuring `package`\n\nYou can set `electronPackagerConfig` with any of the options from\n[Electron Packager](https://github.com/electron-userland/electron-packager/blob/master/docs/api.md), except:\n\n* `arch`\n* `asar.unpack` (use `asar.unpackDir` instead)\n* `dir`\n* `electronVersion` (uses the exact version specified for `electron-prebuilt-compile` in your `devDependencies`)\n* `out`\n* `platform`\n* `quiet`\n\n**NOTE:** You can also set your `forge` config property of your package.json to point to a JS file that exports the config object:\n\n```js\n{\n ...\n \"config\": {\n \"forge\": \"./forge.config.js\"\n }\n ...\n}\n```\n\n**NOTE:** If you use the JSON object then the `afterCopy` and `afterExtract` options are mapped to `require`\ncalls internally, so provide a path to a file that exports your hooks and they will still run. If you use\nthe JS file method mentioned above then you can use functions normally.\n\n## Possible `publish` targets\n\n| Target Name | Description | Required Config |\n|-------------|-------------|-----------------|\n| GitHub Releases - `github` | Makes a new release for the current version (if required) and uploads the make artifacts as release assets | `process.env.GITHUB_TOKEN` - A personal access token with access to your releases <br />`forge.github_repository.owner` - The owner of the GitHub repository<br />`forge.github_repository.name` - The name of the GitHub repository <br />`forge.github_repository.draft` - Create the release as a draft, defaults to `true` <br />`forge.github_repository.prerelease` - Identify the release as a prerelease, defaults to `false` |\n| Amazon S3 - `s3` | Uploads your artifacts to the given S3 bucket | `process.env.ELECTRON_FORGE_S3_SECRET_ACCESS_KEY` - Your secret access token for your AWS account _(falls back to the standard `AWS_SECRET_ACCESS_KEY` environment variable)_<br />`forge.s3.accessKeyId` - Your access key for your AWS account _(falls back to the standard `AWS_ACCESS_KEY_ID` environment variable)_<br />`forge.s3.bucket` - The name of the S3 bucket to upload to<br />`forge.s3.folder` - The folder path to upload to inside your bucket, defaults to your application version<br />`forge.s3.public` - Whether to make the S3 upload public, defaults to `false` |\n| [Electron Release Server](https://github.com/ArekSredzki/electron-release-server) - `electron-release-server` | Makes a new release for the current version and uploads the artifacts to the correct platform/arch in the given version. If the version already exists no upload will be performed. The channel is determined from the current version. | `forge.electronReleaseServer.baseUrl` - The base URL of your release server, no trailing slash<br />`forge.electronReleaseServer.username` - The username for the admin panel on your server<br />`forge.electronReleaseServer.password` - The password for the admin panel on your server |\n\nFor example:\n\n```javascript\n// github\n{\n // Assume the GitHub repository is at https://github.com/username/repo\n \"github_repository\": {\n \"owner\": \"username\",\n \"name\": \"repo\"\n }\n}\n\n// s3\n{\n \"s3\": {\n \"accessKeyId\": \"<AWS_ACCESS_KEY>\",\n \"bucket\": \"my_bucket_name\",\n \"public\": true\n }\n}\n\n// Electron Release Server\n{\n \"electronReleaseServer\": {\n \"baseUrl\": \"https://update.mysite.com\",\n \"username\": \"admin\",\n \"password\": \"no_one_will_guess_this\"\n }\n}\n```\n\n## Custom `make` and `publish` targets\n\nYou can make your own custom targets for the `make` and `publish` targets. If you publish them as `electron-forge-publisher-{name}` or `electron-forge-maker-{name}` you can then just specify `{name}` as your make / publish target. The API for each is documented below.\n\n### API for `make` targets\n\nYou must export a Function that returns a Promise. Your function will be called with the following parameters.\n\n* `appDir` - The directory containing the packaged application\n* `appName` - The productName of the application\n* `targetArch` - The target architecture of the make command\n* `forgeConfig` - An object representing the users forgeConfig\n* `packageJSON` - An object representing the users package.json file\n\nYour promise must resolve with an array of the artifacts you generated.\n\n### API for `publish` targets\n\nYou must export a Function that returns a Promise. Your function will be called with the following parameters.\n\n* artifactPaths - An array of absolute paths to artifacts to publish\n* packageJSON - An object representing the users package.json file\n* forgeConfig - An object representing the users forgeConfig\n* authToken - The value of `--auth-token`\n* tag - The value of `--tag`\n* platform - The platform you are publishing for\n* arch - The arch you are publishing for\n\nYou should use `ora` to indicate your publish progress.\n\n## Debugging your application through VS Code\n\nDebugging your Electron main process through VS Code is ridiculously\neasy with Forge. Simply add this as a launch config in VSCode and you're\ngood to go.\n\n```js\n{\n \"type\": \"node\",\n \"request\": \"launch\",\n \"name\": \"Electron Main\",\n \"runtimeExecutable\": \"${workspaceRoot}/node_modules/.bin/electron-forge-vscode-nix\",\n \"windows\": {\n \"runtimeExecutable\": \"${workspaceRoot}/node_modules/.bin/electron-forge-vscode-win.cmd\"\n },\n // runtimeArgs will be passed directly to your Electron application\n \"runtimeArgs\": [\n \"foo\",\n \"bar\"\n ],\n \"cwd\": \"${workspaceRoot}\"\n}\n```\n",
1792 "longname": "/Users/sattard/projects/electron-forge/README.md",
1793 "name": "./README.md",
1794 "static": true,
1795 "access": "public"
1796 },
1797 {
1798 "kind": "packageJSON",
1799 "content": "{\n \"name\": \"electron-forge\",\n \"version\": \"3.2.0\",\n \"description\": \"A complete tool for building modern Electron applications\",\n \"repository\": \"https://github.com/electron-userland/electron-forge\",\n \"main\": \"dist/api/index.js\",\n \"bin\": {\n \"electron-forge\": \"dist/electron-forge.js\",\n \"forge\": \"dist/electron-forge.js\",\n \"electron-forge-vscode-nix\": \"script/vscode.sh\",\n \"electron-forge-vscode-win\": \"script/vscode.cmd\"\n },\n \"scripts\": {\n \"build\": \"gulp build\",\n \"precommit\": \"npm run lint\",\n \"commit\": \"git-cz\",\n \"docs\": \"esdoc\",\n \"install\": \"node tabtab-install.js\",\n \"lint\": \"eslint src test gulpfile.babel.js\",\n \"prepublish\": \"gulp build\",\n \"pretest\": \"gulp build\",\n \"test\": \"npm run lint && npm run test-all\",\n \"test-coverage\": \"npm run lint && npm run test-all-coverage\",\n \"test-all\": \"mocha test/**/*_spec*.js test/**/**/*_spec*.js --compilers js:babel-register --timeout=300000\",\n \"test-fast\": \"mocha test/**/*_spec.js test/**/**/*_spec.js --compilers js:babel-register --timeout=10000\",\n \"test-all-coverage\": \"cross-env NODE_ENV=test nyc npm run test-all\",\n \"test-fast-coverage\": \"cross-env NODE_ENV=test nyc npm run test-fast\",\n \"release:patch\": \"changelog -p && node ci/fix-changelog.js && git add CHANGELOG.md && git commit -m \\\"updated CHANGELOG.md\\\" && npm version patch && git push origin && git push origin --tags\",\n \"release:minor\": \"changelog -m && node ci/fix-changelog.js && git add CHANGELOG.md && git commit -m \\\"updated CHANGELOG.md\\\" && npm version minor && git push origin && git push origin --tags\",\n \"release:major\": \"changelog -M && node ci/fix-changelog.js && git add CHANGELOG.md && git commit -m \\\"updated CHANGELOG.md\\\" && npm version major && git push origin && git push origin --tags\",\n \"watch\": \"gulp watch\",\n \"watch-link\": \"nodemon --watch src --exec \\\"npm link\\\"\"\n },\n \"author\": \"Samuel Attard\",\n \"license\": \"MIT\",\n \"devDependencies\": {\n \"asar\": \"^0.13.0\",\n \"babel-eslint\": \"^7.0.0\",\n \"babel-plugin-istanbul\": \"^4.0.0\",\n \"babel-plugin-syntax-async-functions\": \"^6.13.0\",\n \"babel-plugin-transform-async-to-module-method\": \"^6.16.0\",\n \"babel-plugin-transform-runtime\": \"^6.15.0\",\n \"babel-preset-es2015\": \"^6.16.0\",\n \"chai\": \"^4.0.0\",\n \"chai-as-promised\": \"^7.0.0\",\n \"commitizen\": \"^2.8.6\",\n \"coveralls\": \"^2.11.15\",\n \"cross-env\": \"^5.0.0\",\n \"cz-customizable\": \"5.0.0\",\n \"esdoc\": \"^1.0.1\",\n \"esdoc-importpath-plugin\": \"^1.0.0\",\n \"esdoc-standard-plugin\": \"^1.0.0\",\n \"eslint\": \"^3.7.1\",\n \"eslint-config-airbnb-base\": \"^8.0.0\",\n \"eslint-plugin-import\": \"^1.16.0\",\n \"eslint-plugin-mocha\": \"^4.8.0\",\n \"fetch-mock\": \"^5.1.0\",\n \"generate-changelog\": \"^1.0.2\",\n \"gulp\": \"^3.9.1\",\n \"gulp-babel\": \"^6.1.2\",\n \"mocha\": \"^3.2.0\",\n \"nodemon\": \"^1.11.0\",\n \"nyc\": \"^11.0.0\",\n \"proxyquire\": \"^1.7.10\",\n \"sinon\": \"^3.0.0\"\n },\n \"babel\": {\n \"sourceMaps\": \"inline\",\n \"env\": {\n \"test\": {\n \"plugins\": [\n \"istanbul\"\n ]\n }\n },\n \"presets\": [\n \"es2015\"\n ],\n \"plugins\": [\n \"transform-runtime\",\n \"syntax-async-functions\",\n [\n \"transform-async-to-module-method\",\n {\n \"module\": \"bluebird\",\n \"method\": \"coroutine\"\n }\n ]\n ]\n },\n \"nyc\": {\n \"reporter\": [\n \"lcov\",\n \"text-summary\",\n \"html\"\n ],\n \"sourceMap\": false,\n \"instrument\": false,\n \"cache\": true\n },\n \"dependencies\": {\n \"aws-sdk\": \"^2.9.0\",\n \"babel-register\": \"^6.16.3\",\n \"bluebird\": \"^3.4.6\",\n \"colors\": \"^1.1.2\",\n \"commander\": \"^2.9.0\",\n \"debug\": \"^3.0.0\",\n \"electron-forge-template-angular2\": \"^1.0.3\",\n \"electron-forge-template-react\": \"^1.0.2\",\n \"electron-forge-template-react-typescript\": \"^1.0.3\",\n \"electron-forge-template-vue\": \"^1.0.2\",\n \"electron-packager\": \"^9.0.0\",\n \"electron-rebuild\": \"^1.6.0\",\n \"form-data\": \"^2.1.4\",\n \"fs-extra\": \"^4.0.0\",\n \"github\": \"^9.0.0\",\n \"glob\": \"^7.1.1\",\n \"inquirer\": \"^3.0.1\",\n \"lodash.template\": \"^4.4.0\",\n \"log-symbols\": \"^2.0.0\",\n \"node-fetch\": \"^1.6.3\",\n \"node-gyp\": \"^3.4.0\",\n \"nugget\": \"^2.0.1\",\n \"opn\": \"^5.0.0\",\n \"ora\": \"^1.1.0\",\n \"pify\": \"^3.0.0\",\n \"resolve-package\": \"^1.0.1\",\n \"s3\": \"^4.4.0\",\n \"semver\": \"^5.3.0\",\n \"spawn-rx\": \"^2.0.7\",\n \"sudo-prompt\": \"^7.0.0\",\n \"tabtab\": \"^2.2.1\",\n \"username\": \"^3.0.0\",\n \"yarn-or-npm\": \"^2.0.2\",\n \"zip-folder\": \"^1.0.0\"\n },\n \"config\": {\n \"commitizen\": {\n \"path\": \"./node_modules/cz-customizable\"\n },\n \"cz-customizable\": {\n \"config\": \"./.cz.js\"\n }\n },\n \"optionalDependencies\": {\n \"electron-installer-debian\": \"^0.5.0\",\n \"electron-installer-dmg\": \"^0.2.0\",\n \"electron-installer-flatpak\": \"^0.6.0\",\n \"electron-installer-redhat\": \"^0.5.0\",\n \"electron-windows-store\": \"^0.10.1\",\n \"electron-winstaller\": \"^2.5.0\"\n },\n \"engines\": {\n \"node\": \">= 6.0\"\n }\n}\n",
1800 "longname": "/Users/sattard/projects/electron-forge/package.json",
1801 "name": "package.json",
1802 "static": true,
1803 "access": "public"
1804 }
1805]
\No newline at end of file