-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
24 lines (19 loc) · 1.24 KB
/
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
all : dist/smartypants.min.js smartypants.js smartypants.cjs smartypants.es6.js smartypants.mjs
.PHONY : all
dist/smartypants.min.js: smartypants.js
mkdir -p dist
./node_modules/.bin/uglifyjs smartypants.js --comments '/^!/' --support-ie8 > dist/smartypants.min.js
smartypants.js: smartypants.es6.js template.js
./node_modules/.bin/tsc smartypants.ts; mv smartypants.js smartypants.src.js
sed -i.bak 's/^/ /g' smartypants.src.js; rm smartypants.src.js.bak
cat template.js | perl -pe 's/^\/\/\ \@CODE/`cat smartypants.src.js`/ge' > smartypants.indent.js; rm smartypants.src.js
cat smartypants.indent.js | gunexpand -t 4 --first-only - | gexpand -t 2 - > smartypants.js; rm smartypants.indent.js
# cat smartypants.indent.js | unexpand -t 4 --first-only | expand -t 2 > smartypants.js; rm smartypants.indent.js
smartypants.cjs: smartypants.js
cp smartypants.js smartypants.cjs
smartypants.mjs: smartypants.es6.js
cp smartypants.es6.js smartypants.mjs
smartypants.es6.js: smartypants.ts
./node_modules/.bin/tsc smartypants.ts --target es6;
cat smartypants.js | gunexpand -t 4 --first-only - | gexpand -t 2 - > smartypants.es6.js; rm smartypants.js
# cat smartypants.js | unexpand -t 4 --first-only | expand -t 2 > smartypants.es6.js; rm smartypants.js