-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.js
37 lines (31 loc) · 859 Bytes
/
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
37
import * as esbuild from 'esbuild';
export function build() {
const lib_name = 'blick';
esbuild.buildSync({
entryPoints: ['./src/browser.js'],
bundle: true,
format: 'iife',
outfile: `./dist/${lib_name}.js`,
sourcemap: true,
target: "es6"
});
esbuild.buildSync({
entryPoints: ['./src/browser.js'],
bundle: true,
minify: true,
outfile: `./dist/${lib_name}.min.js`,
sourcemap: true,
target: "es6"
});
esbuild.buildSync({
entryPoints: ['./src/node/index.js'],
bundle: true,
platform: 'node',
packages: 'external',
format: 'esm',
outfile: `./dist/${lib_name}.node.js`,
// target: "es6"
});
console.log('\nBuilding complete!\n');
}
build()