-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (47 loc) · 1.3 KB
/
Makefile
File metadata and controls
60 lines (47 loc) · 1.3 KB
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
YARN := $(shell command -v yarn 2> /dev/null)
BIN := ./node_modules/.bin
help:
@echo ' setup .................... sets up project dependencies'
@echo ' run ...................... runs project'
@echo ' test ..................... runs tests'
@echo ' setup_upgrade ............ upgrades project dependencies'
@echo ' clean .................... deletes project dependencies'
@echo ' install_node.............. sets up node version'
@echo ' setup_nvm ................ sets up nvm'
@echo ' lint ..................... runs code linter'
setup: install_node
ifndef YARN
npm install
else
yarn
endif
build:
npm run build
pack-osx:
npm run pack:osx
watch:
npm run dev
run:
npm start
lint:
$(BIN)/eslint --ext .js src/
lint-autofix:
$(BIN)/eslint --fix --ext .js src/
test:
$(MAKE) lint
npm test
setup_upgrade: clean
npm install
install_node: setup_nvm
bash -c "source ~/.nvm/nvm.sh && nvm install 6.9.4 && nvm use 6.9.4"
@echo "Add these lines to your bash_profile, bashrc ..."
@echo " source ~/.nvm/nvm.sh"
@echo " [[ -r $NVM_DIR/bash_completion ]] && . $NVM_DIR/bash_completion"
setup_nvm:
if test -d ~/.nvm ; then \
echo "Nvm is already installed"; \
else \
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash; \
fi
clean:
-rm -rf node_modules