handlebars-i18n-cli 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/node.js.yml +31 -0
- package/README.md +20 -2
- package/package.json +2 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
|
|
3
|
+
|
|
4
|
+
name: Node.js CI
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ "main" ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ "main" ]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
strategy:
|
|
18
|
+
matrix:
|
|
19
|
+
node-version: [14.x, 16.x, 18.x]
|
|
20
|
+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v3
|
|
24
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
25
|
+
uses: actions/setup-node@v3
|
|
26
|
+
with:
|
|
27
|
+
node-version: ${{ matrix.node-version }}
|
|
28
|
+
cache: 'npm'
|
|
29
|
+
- run: npm ci
|
|
30
|
+
- run: npm run build --if-present
|
|
31
|
+
- run: npm test
|
package/README.md
CHANGED
|
@@ -5,7 +5,9 @@ It will help to automatically extract translation strings from your handlebars t
|
|
|
5
5
|
json files from it. It also helps to keep your translations up to date when changes are made in the templates.
|
|
6
6
|
|
|
7
7
|
[](https://opensource.org/licenses/MIT)
|
|
8
|
-
|
|
8
|
+
[](https://github.com/fwalzel/handlebars-i18n-cli/actions/workflows/node.js.yml/badge.svg)
|
|
9
|
+
[](https://api.codiga.io/project/35110/score/svg)
|
|
10
|
+
[](https://snyk.io/test/github/fwalzel/handlebars-i18n-cli/badge.svg)
|
|
9
11
|
|
|
10
12
|
## License
|
|
11
13
|
|
|
@@ -16,7 +18,7 @@ MIT License
|
|
|
16
18
|
## Install
|
|
17
19
|
|
|
18
20
|
```bash
|
|
19
|
-
$ npm i handlebars-i18n-cli
|
|
21
|
+
$ npm i handlebars-i18n-cli --save-dev
|
|
20
22
|
```
|
|
21
23
|
|
|
22
24
|
|
|
@@ -242,6 +244,22 @@ $ i18n-collect my-project/**/*.html my-project/translation --update --lng=de,en,
|
|
|
242
244
|
Leave out the language ending and json file extension and give only the base name for <target>. In this example case handlebars-i18n-cli would look for *translation.de.json*, *translation.en.json*, and *translation.en.json* to update them. A language file that does not exist yet will be generated.
|
|
243
245
|
|
|
244
246
|
|
|
247
|
+
## Fix for "Command not found"
|
|
248
|
+
|
|
249
|
+
In case you get an error trying to run `$ i18n-collect` like
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
bash: i18n-collect: command not found
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
you might need to link i18n-collect first. Running the following commands should fix this:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
cd node_modules/handlebars-i18n-cli
|
|
259
|
+
sudo npm link
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
|
|
245
263
|
## Run tests
|
|
246
264
|
|
|
247
265
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "handlebars-i18n-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "A CLI tool to support node module handlebars-i18n",
|
|
5
5
|
"main": "./src/i18n-collect.js",
|
|
6
6
|
"bin": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"homepage": "https://github.com/fwalzel/handlebars-i18n-cli#readme",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"esm": "^3.2.25",
|
|
38
|
-
"util": "^0.12.
|
|
38
|
+
"util": "^0.12.5"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"chai": "^4.3.6",
|