-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathelectron-builder.yml
More file actions
64 lines (57 loc) · 2.46 KB
/
Copy pathelectron-builder.yml
File metadata and controls
64 lines (57 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Packaging for the desktop build. Kept in its own file so package.json stays a
# library manifest — in particular `main` there must keep pointing at index.js
# for `import ... from "brepscript"`, so the Electron entry is injected via
# extraMetadata below rather than by editing it.
appId: com.randotechnerd.brepcode
productName: BREPcode
copyright: MIT — bundles the BREP.io kernel unmodified, see LICENSE.md
directories:
output: dist-desktop
buildResources: desktop
# Only the shell and the already-built static bundle. node_modules is
# deliberately absent: dist-site is self-contained (build-site.mjs inlines the
# kernel and vendor files), so shipping them twice would double the download.
files:
- desktop/**/*
- dist-site/**/*
- LICENSE.md
- package.json
# electron-builder bundles production dependencies by default, which here
# meant shipping three/replicad/the kernel a SECOND time — 11k files and
# ~330MB of asar that nothing loads, because dist-site already vendors
# everything it needs and main.cjs only uses electron + node builtins.
- "!node_modules/**/*"
# ...with one exception: SMTP needs a real client, and nodemailer is the only
# dependency the main process actually loads. It has no dependencies of its
# own, so this pulls in ~670KB and nothing else.
- node_modules/nodemailer/**/*
extraMetadata:
main: desktop/main.cjs
# .bcode is the project file — the model itself rather than a mesh of it.
#
# NOTE this only takes effect for an INSTALLER target. A portable exe has no
# installer, so nothing writes the registry keys and Windows will not offer
# BREPcode on its own. What does work today, and what main.cjs is wired for, is
# the manual route: right-click a .bcode -> Open with -> Choose another app ->
# Browse to BREPcode.exe -> "Always use this app". Windows remembers it, and
# the app reads the path out of argv and opens the model. Add an `nsis` target
# and this block registers the type properly.
fileAssociations:
- ext: bcode
name: BREPcode model
description: An editable, parametric BREPcode model
role: Editor
icon: desktop/icon.png
# Nothing here is asar-hostile, and packing keeps the install small and the
# file count sane.
asar: true
win:
icon: desktop/icon.png
target:
- target: portable
arch: [x64]
# A single self-contained exe, no installer, no admin rights — the least
# confusing thing to hand someone from a GitHub release.
portable:
artifactName: BREPcode.exe
unicode: true