forked from vigetlabs/ars-arsenal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (33 loc) · 1.02 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
MAKEFLAGS += '-j 4'
.PHONY: clean build package.json docs release example sass css
build: clean javascript typescript css package.json documentation
javascript: $(subst src,dist,$(shell find src -name '*.js' ! -name '*-test.js'))
typescript: $(subst src,dist,$(shell find src -name '*.ts*'))
dist/%.js: src/%.js
@mkdir -p $(@D)
@yarn babel $< > dist/$*.js
@echo "[+] dist/$*.js"
dist/%.ts: src/%.ts
@mkdir -p $(@D)
@yarn babel $< > dist/$*.js
@echo "[+] dist/$*.js"
dist/%.tsx: src/%.tsx
@mkdir -p $(@D)
@yarn babel $< > dist/$*.js
@echo "[+] dist/$*.js"
css: sass
yarn node-sass ./dist/style/ars-arsenal.scss --stdout > dist/style.css
sass:
@mkdir -p dist
cp -r src/style dist/style
package.json:
@node -p 'p=require("./package");p.private=undefined;p.scripts=p.devDependencies=undefined;JSON.stringify(p,null,2)' > dist/package.json
documentation: README.md LICENSE.md
@mkdir -p dist
cp -r $^ dist
release: clean build
npm publish dist
prerelease: clean build
npm publish dist --tag beta
clean:
rm -rf dist