This repository has been archived by the owner on Jul 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
63 lines (44 loc) · 1.57 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
# Defining shell is necessary in order to modify PATH
SHELL := sh
export PATH := node_modules/.bin/:$(PATH)
export NODE_OPTIONS := --trace-deprecation
# Allow overriding the current distribution channel when using `make link`
APM_BIN := apm-nightly
# Modify these variables in local.mk to add flags to the commands, ie.
# NPM_FLAGS += --prefer-offline
NPM_FLAGS :=
GITFILES := $(patsubst utils/githooks/%, .git/hooks/%, $(wildcard utils/githooks/*))
# Do this when make is invoked without targets
all: node_modules githooks
# GENERIC TARGETS
# package-lock.json breaks Atom's activation process because it thinks that fsevents, a dev dep, is
# actually a production dep. 🤷♂️
node_modules: package.json
npm install $(NPM_FLAGS) && touch node_modules && rm package-lock.json
# Default target for all possible git hooks
.git/hooks/%: utils/githooks/%
cp $< $@
# TASK DEFINITIONS
githooks: $(GITFILES)
install: node_modules $(GITFILES)
lint: force install
remark --quiet .
version: force install
utils/version.sh
outdated:
npm outdated || true
unlock: pristine
rm -f package-lock.json
touch package.json
clean:
rm -rf {.nyc_output,coverage,docs}
find . -name '*.log' -print -delete
pristine: clean
rm -rf node_modules
# Set up everything needed for local development. This expects that the atom-ide-mocha-core
# repository is cloned next to this repository, ie. in the same parent folder. ⚠️
link: node_modules $(GITFILES)
$(APM_BIN) remove ide-mocha && $(APM_BIN) link .
npm link ../atom-ide-mocha-core/packages/atom-ide-mocha-core .
.PHONY: force
-include local.mk