-
Notifications
You must be signed in to change notification settings - Fork 91
/
Makefile
38 lines (35 loc) · 931 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
level?=patch
# Development
lint:
@echo "Linting..."
@npx eslint .
lint-fix:
@echo "Fix linting..."
@npx eslint --fix .
dev:
@echo "Starting server..."
@NODE_ENV=development npx webpack-dev-server --config ./webpack/demo.js --progress
.PHONY: lint lint-fix dev
# Test
test: lint-fix
@echo "Running test..."
@npx jest
.PHONY: test
# Deployment
build:
@echo "Building lib..."
@rm -rf ./dist
@npx webpack --config ./webpack/production.js --progress --bail
@echo "Copy type into dist..."
@cp src/types.ts dist/index.d.ts
build-demo:
@echo "Building demo..."
@rm -rf ./demo/dist
@NODE_ENV=production npx webpack --config ./webpack/demo.js --progress --bail
release:
@echo "Release $(level)"
@echo "Adding tag and modify the CHANGELOG"
@npx standard-version --release-as $(level)
@echo "Pushing to the github and trigger action for npm:publish"
@git push --follow-tags origin main
.PHONY: build build-demo release