Skip to content

Commit ded4a8c

Browse files
committed
improved makefile
1 parent b5b04bf commit ded4a8c

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

Makefile

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,38 @@
11
BUILD_DIR = .build
22
TEST_DIR = .
3+
SEMVER=prerelease --preid=beta
34

4-
build:
5+
install:
6+
npm install
7+
npm run build
8+
cd examples/articles && npm install && npm link && npm run build;
9+
cd examples/blocks && npm install && npm link && npm run build;
10+
cd examples/masonry && npm install && npm link && npm run build;
11+
.PHONY: install
12+
13+
up:
14+
npm run start
15+
open http://localhost:8080
16+
.PHONY: up
17+
18+
build: guard-SEMVER
519
mkdir $(BUILD_DIR)
620
git archive HEAD | tar -x -C $(BUILD_DIR)
721
cd $(BUILD_DIR); \
22+
npm --no-git-tag-version version $(SEMVER); \
823
npm install; \
9-
npm run build;
24+
npm run build --production;
1025
.PHONY: build
1126

1227
test:
1328
cd $(TEST_DIR); \
29+
npm run lint && \
1430
npm run test
1531
.PHONY: test
1632

1733
release: TEST_DIR=$(BUILD_DIR)
18-
release: guard-SEMVER clean build test
34+
release: clean build test
1935
cd $(BUILD_DIR); \
20-
npm --no-git-tag-version version $(SEMVER); \
2136
npm publish
2237
.PHONY: release
2338

0 commit comments

Comments
 (0)