-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
94 lines (73 loc) · 1.79 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
87
88
89
90
91
92
93
94
NPM_CMD ?= npm
ZIP_CMD ?= tar
ZIP_OPTIONS ?= -zcf
PACKAGE = `pwd`
SRC = $(PACKAGE)/src
ASSETS = $(PACKAGE)/assets
DIST = $(PACKAGE)/dist
.PHONY: coverage test
default: test coverage clean compile distribute
run: test lint build start
dependencies:
$(NPM_CMD) install
lint:
$(NPM_CMD) run lint
test:
$(NPM_CMD) test
coverage:
$(NPM_CMD) run coverage
clean:
rm -r $(DIST) | true #2>&1 >/dev/null #> /dev/null 2>&1
mkdir -p $(DIST)
rm -r $(ASSETS)/source.js* | true #2>&1 >/dev/null #> /dev/null 2>&1
rm -r node_modules/ | true
build:
$(NPM_CMD) run build
compile-linux:
@echo "\nLinux\n"
$(NPM_CMD) run compile:linux -- \
--ignore=README.md \
--ignore=webpack.config.js \
--ignore=Makefile \
--ignore=yarn.lock \
--ignore=.gitignore \
--ignore=src \
--ignore=node_modules \
--win32metadata.CompanyName='Minimal Chat' \
--win32metadata.ProductName=Operator \
--appname=Operator \
--app-copyright=BSD-3
compile-win:
@echo "\nWindows\n"
$(NPM_CMD) run compile:win -- \
--ignore=README.md \
--ignore=webpack.config.js \
--ignore=Makefile \
--ignore=yarn.lock \
--ignore=.gitignore \
--ignore=src \
--ignore=node_modules \
--win32metadata.CompanyName='Minimal Chat' \
--win32metadata.ProductName=Operator \
--appname=Operator \
--app-copyright=BSD-3
compile-osx:
@echo "\nOSX\n"
$(NPM_CMD) run compile:osx -- \
--ignore=README.md \
--ignore=webpack.config.js \
--ignore=Makefile \
--ignore=yarn.lock \
--ignore=.gitignore \
--ignore=src \
--ignore=node_modules \
--win32metadata.CompanyName='Minimal Chat' \
--win32metadata.ProductName=Operator \
--appname=Operator \
--app-copyright=BSD-3
compile: build compile-linux compile-win compile-osx
distribute:
@echo
@cd $(DIST); ls -d * | xargs -I [] $(ZIP_CMD) $(ZIP_OPTIONS) [].tar.gz []
start:
$(NPM_CMD) start