-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (21 loc) · 680 Bytes
/
Copy pathMakefile
File metadata and controls
27 lines (21 loc) · 680 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
.PHONY: build, dist, lint, install
SHELL=/bin/bash -O extglob
NOW=`date '+%s'`
build: dist clean
cat ./src/!(main).ts ./src/main.ts > ./src/archetypum.ts
tsc -p tsconfig.json
cp ./src/index.html ./dist/
sed -i.bak -e '/CSS_SOURCE/r ./src/index.css' -e '/CSS_SOURCE/d' ./dist/index.html
sed -i.bak -e '/JS_SOURCE/r ./dist/archetypum.js' -e '/JS_SOURCE/d' ./dist/index.html
lint:
tslint --type-check --project ./src/
install:
npm install -g typescript
npm install -g tslint
clean:
rm -f ./src/archetypum.ts
rm -rf dist/*.{js,map,bak}
demo: build
mkdir -p demo
cp -v dist/index.html demo/index_${NOW}.html
sed -i.bak -e "s/index_[0-9]*/index_${NOW}/" README.md