-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
52 lines (39 loc) · 863 Bytes
/
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
MIX_ENV ?= prod
define HELP
Usage:
make lint
Lint all files in the app.
This is the same as calling:
make lint-elixir && make lint-scripts
make lint-elixir
Lint all elixir files in the app.
make lint-scripts
Lint all JavaScript files in the app.
make lint-fix
Quickly fix linting errors that do not require manual input
make help
Shows this help message
make docs
Generate docs for ex_prosemirror # Should be remove when release to public
endef
.PHONY: lint
lint: lint-elixir lint-scripts ## Lint project files
.PHONY: lint-elixir
lint-elixir:
mix credo --strict
mix format --check-formatted
.PHONY: lint-scripts
lint-scripts:
cd assets && npx eslint .
.PHONY: lint-fix
lint-fix:
mix format
cd assets && npx eslint . --fix
.PHONY: docs
docs:
rm -rf docs
mix docs -o docs
git add docs
.PHONY: help
help:
$(info $(HELP))