forked from koenbok/Framer
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
86 lines (52 loc) · 1.44 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Configuration
BIN = $(CURDIR)/node_modules/.bin
DEFAULT_TARGET = extras/Studio.framer
TARGET ?= $(DEFAULT_TARGET)
TARGET_EXPANDED = $(shell echo $(TARGET)) # For ~ in paths, gulp needs this
.PHONY: watch test debug release
default: lazy_bootstrap lazy_build test
# Utilities
bootstrap:
npm install
lazy_bootstrap: ; @test -d ./node_modules || make bootstrap
unbootstrap:
rm -Rf node_modules
clean:
rm -rf build
rm -Rf node_modules
# Building and testing
watch: lazy_bootstrap
-cp $(DEFAULT_TARGET)/index.html $(TARGET)
TARGET='$(strip $(TARGET_EXPANDED))' $(BIN)/gulp watch
build: lazy_bootstrap
$(BIN)/gulp webpack:debug
lazy_build: ; @test -f ./build/framer.debug.js || make build
test: lazy_build
$(BIN)/gulp test
lint: lazy_build
$(BIN)/gulp lint
release: lazy_bootstrap
$(BIN)/gulp webpack:release
# Framer Studio
studio:
open -a "Framer Beta" ${TARGET}
make watch
perf: debug
open -a "Framer Beta" extras/Perf.framer
# Distribution
dist: release
scripts/dist.sh
site-build: dist
scripts/site-build.sh
site-upload: bootstrap site-build
$(BIN)/coffee scripts/site.coffee upload
# Resources
resources:
scripts/resources-optimize.sh
# Code coverage
coverage: bootstrap
$(BIN)/gulp version
mkdir -p ./build/build
$(BIN)/coffeeCoverage -t istanbul -c __coverage__ ./build/Version.coffee ./build/build/Version.js
$(BIN)/coffeeCoverage -t istanbul -c __coverage__ ./framer ./build/instrumented
$(BIN)/gulp coverage