Skip to content

Commit f1d1e65

Browse files
committed
adjsut make file
1 parent f204bba commit f1d1e65

File tree

2 files changed

+40
-13
lines changed

2 files changed

+40
-13
lines changed

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SLUG=js-scroll-effect-module
2+
VERSION=0.11.0

Makefile

100644100755
Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,42 @@
1+
include .env
2+
3+
VIM := mvim
4+
5+
PROGRAM := npm
6+
RM := rm -rf
7+
MK := mkdir
8+
CP := cp
9+
ZIP := zip
10+
11+
ZIP_FOLDER := _v$(VERSION)
12+
13+
ENV_DEV := NODE_ENV=development
14+
ENV_PROD := NODE_ENV=production
15+
116
all: editor serve
217

3-
serve:
4-
npm run dev
18+
build: clean prod
19+
20+
install:
21+
$(PROGRAM) install
522

623
editor:
7-
mvim './src/js-scroll-effect-module.js'
8-
9-
build:
10-
@echo "--------------------"
11-
@echo "js-scroll-effect-module\nbuild..."
12-
@echo "--------------------"
13-
@git status -bs
14-
@echo "--------------------"
15-
rm -rf "./dist/"
16-
@echo "--------------------"
17-
npm run prod
24+
$(VIM) './'
25+
26+
clean:
27+
$(RM) dist
28+
29+
serve:
30+
$(ENV_DEV) $(PROGRAM) run dev
31+
32+
prod:
33+
$(ENV_PROD) $(PROGRAM) run prod
34+
35+
zip:
36+
$(RM) $(ZIP_FOLDER)
37+
$(MK) $(ZIP_FOLDER)
38+
$(CP) dist/js-scroll-effect-module.js examples/index.html $(ZIP_FOLDER)/
39+
sed -i "" "s/..\/dist\//.\//g" "$(ZIP_FOLDER)/index.html"
40+
$(ZIP) $(ZIP_FOLDER)/$(VERSION).zip -r $(ZIP_FOLDER)/*
41+
42+
.PHONY: all build editor serve clean prod zip install

0 commit comments

Comments
 (0)