forked from ursuscamp/nostore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.js
executable file
·36 lines (34 loc) · 1.41 KB
/
build.js
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
#!/usr/bin/env node
let watch =
process.argv[2] === 'watch'
? {
onRebuild(error, result) {
if (error) console.error('watch rebuild failed: ', error);
else console.log('watch rebuild succeeded: ', result);
},
}
: false;
require('esbuild')
.build({
entryPoints: {
'background.build': './Shared (Extension)/Resources/background.js',
'content.build': './Shared (Extension)/Resources/content.js',
'nostr.build': './Shared (Extension)/Resources/nostr.js',
'popup.build': './Shared (Extension)/Resources/popup.js',
'options.build': './Shared (Extension)/Resources/options.js',
'permission/permission.build':
'./Shared (Extension)/Resources/permission/permission.js',
'experimental/experimental.build':
'./Shared (Extension)/Resources/experimental/experimental.js',
'wizards/delegation/delegation.build':
'./Shared (Extension)/Resources/wizards/delegation/delegation.js',
'event_history/event_history.build':
'./Shared (Extension)/Resources/event_history/event_history.js',
},
outdir: './Shared (Extension)/Resources',
sourcemap: 'inline',
bundle: true,
// minify: true,
watch,
})
.catch(() => process.exit(1));