-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
44 lines (33 loc) · 955 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
# Origami Service Makefile
# ------------------------
# This section of the Makefile should not be modified, it includes
# commands from the Origami service Makefile.
# https://github.com/Financial-Times/origami-service-makefile
include node_modules/@financial-times/origami-service-makefile/index.mk
# [edit below this line]
# ------------------------
# Meta tasks
# ----------
.PHONY: docs
# Documentation tasks
# -------------------
# Regenerate documentation
docs:
@rm -rf docs
@npx jsdoc --configure .jsdoc.json
@$(TASK_DONE)
# Documentation pre-commit hook
docs-precommit: docs
@git add docs
# Set up documentation pre-commit hook
.git/hooks/pre-commit:
@if [ -d .git/hooks ]; then \
echo "#!/bin/sh\nmake docs-precommit" > .git/hooks/pre-commit; \
chmod +x .git/hooks/pre-commit; \
fi
# npm publishing tasks
# --------------------
# Publish the module to npm
npm-publish:
npm-prepublish --verbose
npm publish --access public