Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
162 lines (162 loc) · 10.7 KB
/
Copy pathpackage.json
File metadata and controls
162 lines (162 loc) · 10.7 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
{
"name": "electron-typescript-boilerplate",
"description": "A boilerplate for writing, compiling, building and packaging Electron apps with TypeScript.",
"version": "0.1.0",
"keywords": [
"electron",
"typescript",
"boilerplate",
"template"
],
"os": [
"darwin",
"linux",
"win32"
],
"repository": {
"type": "git",
"url": "git+https://github.com/idesis-gmbh/BareBrowser.git"
},
"readme": "README.md",
"bugs": {
"url": "https://github.com/idesis-gmbh/BareBrowser/issues",
"email": "michael.nitze@michael-nitze.de"
},
"license": "MIT",
"scripts": {
"test": "npm run cmd -- electron ./out/ 'https://github.com/idesis-gmbh/BareBrowser'",
"test_settings": "npm run cmd -- electron ./out/ settings:",
"test_info:": "npm run cmd -- electron ./out/ bb://info:",
"test_close:": "npm run cmd -- electron ./out/ bb://close 1",
"test_set_window_bounds:": "npm run cmd -- electron ./out/ \"https://github.com/idesis-gmbh/BareBrowser?_wbx=100\\&_wby=100\\&_wbw=800\\&_wbh=800\"",
"Watch": "npm run watch",
"Start:Build": "npm run start",
"Start:Release": "npm run s:release",
"Build": "npm run build",
"Compile": "npm run compile",
"Clean": "npm run clean:all",
"Make": "npm run make",
"Make:Mac": "npm run m:darwin",
"Make:Linux": "npm run m:linux",
"Make:Windows": "npm run m:win32",
"Make:All": "npm run make:all",
"Lint": "npm run lint",
"//----- Helper scripts/Makefile ----- //": "",
"cmd": "node ./build/run-cmd.js",
"//##### Clean": "#####",
"clean:darwinrelease": "node ./build/clean-release.js ./app/package.json darwin ./release/",
"clean:linuxrelease": "node ./build/clean-release.js ./app/package.json linux ./release/",
"clean:win32release": "node ./build/clean-release.js ./app/package.json win32 ./release/",
"preclean": "echo ///// Cleaning...",
"clean": "shx rm -rf ./app/node_modules/ ./build/tmp/js/ ./build/tmp/node_modules/ ./build/tmp/package.json ./build/tmp/package-lock.json ./build/tmp/appicon.icns ./build/tmp/appicon.ico ./out/",
"clean:all": "npm run clean -- ./release/",
"//##### Compile main": "#####",
"prec:main:compile": "echo ///// Compiling main...",
"c:main:compile": "./app/node_modules/typescript/bin/tsc -p ./build/tsconfigmain.json",
"prec:main:pack": "echo ///// Packing compiled main...",
"c:main:pack": "rollup --silent -i ./build/tmp/js/MainProcess.js -o ./out/bin/MainProcess.js -f cjs",
"c:main": "npm-run-all -s c:main:compile c:main:pack",
"//##### Compile renderer": "#####",
"prec:renderer:compile": "echo ///// Compiling renderer...",
"c:renderer:compile": "./app/node_modules/typescript/bin/tsc -p ./build/tsconfigrenderer.json",
"prec:renderer:pack": "echo ///// Packing compiled renderer...",
"c:renderer:pack": "rollup --silent -i ./build/tmp/js/RendererProcess.js -o ./out/bin/RendererProcess.js -f cjs",
"c:renderer": "npm-run-all -s c:renderer:compile c:renderer:pack",
"//##### Compile preload": "#####",
"prec:preload:compile": "echo ///// Compiling preload...",
"c:preload:compile": "./app/node_modules/typescript/bin/tsc -p ./build/tsconfigpreload.json",
"prec:preload:pack": "echo ///// Packing compiled preload...",
"c:preload:pack": "rollup --silent -i ./build/tmp/js/preload/preload.js -o ./out/bin/preload.js -f cjs",
"c:preload": "npm-run-all -s c:preload:compile c:preload:pack",
"//##### Compile all": "#####",
"c:all": "./app/node_modules/typescript/bin/tsc -p ./build/tsconfigall.json",
"//##### Compile and pack main, renderer and preload": "#####",
"precompile": "echo ///// Compiling main, renderer and preload...",
"compile": "npm-run-all -s c:all c:main:pack c:renderer:pack c:preload:pack",
"//##### Compress main": "#####",
"prez:main": "echo ///// Compressing main...",
"z:main": "terser -c -m --ecma 2020 -o ./out/bin/MainProcess.js ./out/bin/MainProcess.js",
"//##### Compress renderer": "#####",
"prez:renderer": "echo ///// Compressing renderer...",
"z:renderer": "terser -c -m --ecma 2020 -o ./out/bin/RendererProcess.js ./out/bin/RendererProcess.js",
"//##### Compress preload": "#####",
"prez:preload": "echo ///// Compressing preload...",
"z:preload": "terser -c -m --ecma 2020 -o ./out/bin/preload.js ./out/bin/preload.js",
"//##### Compress main, renderer and preload": "#####",
"precompress": "echo ///// Compressing main, renderer and preload...",
"compress": "npm-run-all -s z:main z:renderer z:preload",
"//##### ESLint": "#####",
"prelint": "echo ///// TypeScript linting...",
"lint": "cd ./app/src && npx eslint -c eslint.config.mjs",
"//##### Build": "#####",
"b:prep-dev-nm": "shx mkdir -p ./build/tmp/ && shx cp -rf ./app/package.json ./app/package-lock.json ./build/tmp/",
"b:make-dev-nm": "cd ./build/tmp/ && npm i && npm prune && cd ../../ && shx cp -rf ./build/tmp/node_modules/ ./app/",
"b:prep-out-nm": "shx mkdir -p ./out/ && shx cp -rf ./app/package.json ./app/package-lock.json ./out/",
"b:make-out-nm": "cd ./out/ && npm i --omit=dev && removeNPMAbsolutePaths . --force --fields _where _args",
"b:strip-out-pj": "node ./build/build-app-package-json.js ./out/package.json && shx rm -rf ./out/package-lock.json",
"b:app-package.json": "npm-run-all -s b:prep-dev-nm b:make-dev-nm b:prep-out-nm b:make-out-nm b:strip-out-pj",
"preb:root": "shx mkdir -p ./out/ && node ./build/clean-app-root-files.js ./out/ bin lib node_modules res style package.json package-lock.json",
"b:root": "shx cp -rf ./app/_root/* ./out/ && node ./build/make-readme-html.mjs ./out/README.md",
"b:style": "shx mkdir -p ./out/ && shx rm -rf ./out/style/ && npm run cmd -- -f ./app/style/ shx cp -rf ./app/style/ ./out/",
"b:lib": "shx mkdir -p ./out/ && shx rm -rf ./out/lib/ && npm run cmd -- -f ./app/lib/ shx cp -rf ./app/lib/ ./out/",
"b:res": "shx mkdir -p ./out/ && shx rm -rf ./out/res/ && npm run cmd -- -f ./app/res/ shx cp -rf ./app/res/ ./out/",
"prebuild": "echo ///// Updating/pruning npm modules, copying app resources...",
"build": "npm-run-all -s b:app-package.json b:root b:style b:lib b:res ",
"//##### Watch for changes": "#####",
"w:app-package.json": "onchange \"./app/package.json\" -v --await-write-finish 300 -- npm-run-all b:app-package.json",
"w:root": "onchange ./app/_root/**/* -v --await-write-finish 300 -- npm run b:root",
"w:style": "onchange ./app/style/* ./app/style/**/* -v --await-write-finish 300 -- npm run b:style",
"w:lib": "onchange ./app/lib/* ./app/lib/**/* -v --await-write-finish 300 -- npm run b:lib",
"w:res": "onchange ./app/res/* ./app/res/**/* -v --await-write-finish 300 -- npm run b:res",
"w:main": "tsc-watch -p ./build/tsconfigmain.json --noClear --compileCommand ./app/node_modules/typescript/bin/tsc --onSuccess \"npm run c:main:pack\"",
"w:renderer": "tsc-watch -p ./build/tsconfigrenderer.json --noClear --compileCommand ./app/node_modules/typescript/bin/tsc --onSuccess \"npm run c:renderer:pack\"",
"w:preload": "tsc-watch -p ./build/tsconfigpreload.json --noClear --compileCommand ./app/node_modules/typescript/bin/tsc --onSuccess \"npm run c:preload:pack\"",
"w:main-renderer-preload": "tsc-watch -p ./build/tsconfigall.json --noClear --compileCommand ./app/node_modules/typescript/bin/tsc --onSuccess \"npm-run-all -p c:main:pack c:renderer:pack c:preload:pack\"",
"prewatch": "echo ///// Starting all watchers:",
"watch": "npm-run-all -p w:app-package.json w:root w:style w:lib w:res w:main-renderer-preload",
"//##### Start packaged app/current build": "#####",
"s:darwin": "node ./build/run-release.js ./app/package.json darwin",
"s:linux": "node ./build/run-release.js ./app/package.json linux",
"s:win32": "node ./build/run-release.js ./app/package.json win32",
"s:release": "node -e \"require('child_process').spawnSync((process.platform == 'win32') ? 'npm.cmd' : 'npm', ['run', 's:' + process.platform], {shell: true, stdio: 'inherit'});\"",
"prestart": "echo ///// Starting current build...",
"start": "npm run cmd -- electron ./out/",
"//##### Make and package darwin": "#####",
"m:darwin:checkwin32": "node -e \"if (process.platform == 'win32') {console.log('Packaging darwin on win32 currently creates unusable files, please use \"\"npm run Make\"\" or \"\"npm run Make:Linux\"\" only.'); process.exit(1);}\"",
"m:darwin:icns": "shx mkdir -p ./build/tmp/ && npm run cmd -- -f ./app/_root/appicon.png png2icons ./app/_root/appicon.png ./build/tmp/appicon -icns -bz",
"m:darwin:pkg": "node ./build/run-electron-packager.js ./app/package.json darwin",
"prem:darwin": "npm run m:darwin:checkwin32 && echo ///// Making darwin release...",
"m:darwin": "npm-run-all -p clean clean:darwinrelease -s build compile compress m:darwin:icns m:darwin:pkg",
"//##### Make and package linux": "#####",
"m:linux:icon": "shx mkdir -p ./out/ && node -e \"const fs = require('fs-extra'); const icon = './out/dockicon.png'; if (!fs.existsSync(icon)) { fs.copyFileSync('./app/_root/appicon.png', icon) }\"",
"m:linux:pkg": "node ./build/run-electron-packager.js ./app/package.json linux",
"prem:linux": "echo ///// Making linux release...",
"m:linux": "npm-run-all -p clean clean:linuxrelease -s build compile compress m:linux:icon m:linux:pkg",
"//##### Make and package win32": "#####",
"m:win32:ico": "shx mkdir -p ./build/tmp/ && npm run cmd -- -f ./app/_root/appicon.png png2icons ./app/_root/appicon.png ./build/tmp/appicon -icowe -bz",
"m:win32:pkg": "node ./build/run-electron-packager.js ./app/package.json win32",
"prem:win32": "echo ///// Making win32 release...",
"m:win32": "npm-run-all -p clean clean:win32release -s build compile compress m:win32:ico m:win32:pkg",
"//##### Make and package darwin, linux and win32": "#####",
"premake:all": "npm run m:darwin:checkwin32 && echo ///// Making darwin, linux and win32 releases...",
"make:all": "npm-run-all -s \"clean -- ./release/\" build -p compile m:darwin:icns m:linux:icon m:win32:ico -s compress m:darwin:pkg m:linux:pkg m:win32:pkg",
"//##### Make and package current platform": "#####",
"make": "node -e \"require('child_process').spawnSync((process.platform == 'win32') ? 'npm.cmd' : 'npm', ['run', 'm:' + process.platform], {shell: true, stdio: 'inherit'});\""
},
"dependencies": {
"@electron/packager": "20.3.0",
"@octokit/core": "7.0.8",
"fs-extra": "11.4.1",
"npm-run-all2": "9.0.4",
"onchange": "7.1.0",
"png2icons": "2.0.1",
"removeNPMAbsolutePaths": "3.0.1",
"rollup": "4.67.4",
"shx": "0.4.0",
"terser": "5.51.2",
"tsc-watch": "7.2.1"
},
"allowScripts": {
"fsevents@2.3.3": true
}
}