-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
53 lines (42 loc) · 1.69 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
# Documentation CLI usage: https://github.com/documentationjs/documentation/blob/master/docs/USAGE.md
i18n = ./src/i18n
transifex_input = $(i18n)/transifex_input.json
transifex_utils = $(i18n)/scripts/transifex-utils.js
# This directory must match .babelrc .
transifex_temp = ./temp/babel-plugin-formatjs
doc_command = ./node_modules/.bin/documentation build src -g -c ./docs/documentation.config.yml -f md -o ./docs/_API-body.md --sort-order alpha
cat_docs_command = cat ./docs/_API-header.md ./docs/_API-body.md > ./docs/API.md
build:
rm -rf ./config ./tools/dist
tsc --project ./tsconfig.json
mkdir -p ./config
cp tools/typescript/tsconfig.json config/tsconfig.json
tsc --project ./tools/tsconfig.json
cp -prf ./tools/dist/config-helpers ./config/config-helpers
cp -prf ./tools/dist/defaultConfigPaths.js ./config/defaultConfigPaths.js
cp -prf ./tools/dist/types.js ./config/types.js
cp -prf ./tools/dist/eslint ./config/eslint
cp -prf ./tools/dist/jest ./config/jest
cp -prf ./tools/dist/webpack ./config/webpack
cp -prf ./tools/dist/babel ./config/babel
cp -prf ./tools/dist/index.js ./config/index.js
docs-build:
${doc_command}
${cat_docs_command}
rm ./docs/_API-body.md
docs-watch:
@echo "NOTE: Please load _API-body.md to see watch results."
${doc_command} -w
docs-lint:
./node_modules/.bin/documentation lint src
.PHONY: requirements
requirements: ## install ci requirements
npm ci
i18n.extract:
# Pulling display strings from .jsx files into .json files...
rm -rf $(transifex_temp)
npm run-script i18n_extract
i18n.concat:
# Gathering JSON messages into one file...
$(transifex_utils) $(transifex_temp) $(transifex_input)
extract_translations: | requirements i18n.extract i18n.concat