-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
45 lines (32 loc) · 954 Bytes
/
Makefile
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
.DEFAULT_GOAL := build
.PHONY: build test
test:
npx jest
test-watch:
npx jest --watch
test-lib:
node test/lib/commonjs.js
npx tsx test/lib/ts.ts
# Test projects
deploy-test-server:
@cd test/server && npx firebase deploy
build-test-extension:
@npx tsc test/extension/index.ts --esModuleInterop --outDir test/extension/build
deploy-test-extension: build-test-extension
@cd test/extension && npx firebase deploy
# Staging & production
build:
@rm -rf lib
@npx tsc
@npx prettier "lib/**/*.[jt]s" --write --loglevel silent
@cp package.json lib
@cp *.md lib
@rsync --archive --prune-empty-dirs --exclude '*.ts' --relative src/./ lib
publish: build test-lib
cd lib && npm publish --access public
publish-next: build
cd lib && npm publish --access public --tag next
build-extension:
@cd extension/functions && npm run build
publish-extension: build-extension
@cd extension && npx firebase ext:dev:publish backupfire/backupfire-agent