File tree 3 files changed +26
-0
lines changed
3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 3
3
.vscode
4
4
coverage
5
5
dist
6
+ src /i18n /transifex_input.json
6
7
node_modules
7
8
/docs /api
8
9
.env.private
10
+ /temp /
Original file line number Diff line number Diff line change 1
1
# Documentation CLI usage: https://github.com/documentationjs/documentation/blob/master/docs/USAGE.md
2
2
3
+ i18n = ./src/i18n
4
+ transifex_input = $(i18n ) /transifex_input.json
5
+ transifex_utils = $(i18n ) /scripts/transifex-utils.js
6
+
7
+ # This directory must match .babelrc .
8
+ transifex_temp = ./temp/babel-plugin-formatjs
9
+
3
10
doc_command = ./node_modules/.bin/documentation build src -g -c ./docs/documentation.config.yml -f md -o ./docs/_API-body.md --sort-order alpha
4
11
cat_docs_command = cat ./docs/_API-header.md ./docs/_API-body.md > ./docs/API.md
5
12
@@ -24,3 +31,19 @@ docs-watch:
24
31
25
32
docs-lint :
26
33
./node_modules/.bin/documentation lint src
34
+
35
+
36
+ .PHONY : requirements
37
+ requirements : # # install ci requirements
38
+ npm ci
39
+
40
+ i18n.extract :
41
+ # Pulling display strings from .jsx files into .json files...
42
+ rm -rf $(transifex_temp )
43
+ npm run-script i18n_extract
44
+
45
+ i18n.concat :
46
+ # Gathering JSON messages into one file...
47
+ $(transifex_utils ) $(transifex_temp ) $(transifex_input )
48
+
49
+ extract_translations : | requirements i18n.extract i18n.concat
Original file line number Diff line number Diff line change 12
12
"docs" : " jsdoc -c jsdoc.json" ,
13
13
"docs-watch" : " nodemon -w src -w docs/template -w README.md -e js,jsx --exec npm run docs" ,
14
14
"lint" : " fedx-scripts eslint --ext .js --ext .jsx ." ,
15
+ "i18n_extract" : " fedx-scripts formatjs extract" ,
15
16
"snapshot" : " fedx-scripts jest --updateSnapshot" ,
16
17
"start" : " fedx-scripts webpack-dev-server --progress" ,
17
18
"test" : " fedx-scripts jest --coverage" ,
You can’t perform that action at this time.
0 commit comments