-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (21 loc) · 708 Bytes
/
Makefile
File metadata and controls
28 lines (21 loc) · 708 Bytes
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
.PHONY: test
test:
npm t
filesize:
@echo "modern raw:"
@cat dist/boxset.modern.js | wc -c
@echo "modern gzip:"
@gzip -9 -c dist/boxset.modern.js | wc -c
source_files: src/index.ts
dist/boxset.cjs.development.js: source_files
npx esbuild --bundle src/index.ts --outfile=$@ --sourcemap --target=node12 --format=cjs --minify-syntax
dist/boxset.cjs.production.min.js: source_files
npx esbuild --bundle src/index.ts --outfile=$@ --sourcemap --target=node12 --format=cjs --minify
dist/boxset.esm.js: source_files
npx esbuild --bundle src/index.ts --outfile=$@ --sourcemap --target=es2017 --format=esm --minify
.PHONY: esbuild
esbuild: dist/*
.PHONY: build
build:
npm run prepack
@$(MAKE) filesize