-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 804 Bytes
/
Makefile
File metadata and controls
40 lines (31 loc) · 804 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
29
30
31
32
33
34
35
36
37
38
39
40
NM := node_modules/.bin
SRC_FILES = $(shell find src -type f)
.SUFFIXES:
.PHONY: publish
wds: yarn.lock
BABEL_ENV=webpack $(NM)/webpack-dev-server --mode=development
dist: yarn.lock $(SRC_FILES)
BABEL_ENV=webpack $(NM)/webpack --mode=production
publish: dist
yarn version
cp package.json dist/package.json
cp README.md dist/README.md
yarn publish dist
publish-latest: dist
yarn version
cp package.json dist/package.json
cp README.md dist/README.md
yarn publish dist --tag latest
test: yarn.lock dist
BABEL_ENV=test node_modules/.bin/jest --coverage
yarn.lock:: package.json
@yarn install --production=false
@touch -mr $@ $<
yarn.lock:: node_modules
@yarn install --production=false --check-files
@touch -mr $@ $<
clean:
rm -rf node_modules
rm -rf dist
node_modules:
mkdir -p $@