@biesbjerg/ng2-translate-extract
Advanced tools
Comparing version 0.2.9 to 0.3.0
{ | ||
"name": "@biesbjerg/ng2-translate-extract", | ||
"version": "0.2.9", | ||
"version": "0.3.0", | ||
"description": "Extract strings from projects using ng2-translate", | ||
@@ -46,21 +46,21 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@types/chai": "^3.4.34", | ||
"@types/cheerio": "^0.17.31", | ||
"@types/glob": "^5.0.30", | ||
"@types/mocha": "^2.2.33", | ||
"chai": "^3.5.0", | ||
"mocha": "^3.2.0", | ||
"ts-node": "^1.7.0", | ||
"tslint": "^4.0.2", | ||
"tslint-eslint-rules": "^3.1.0", | ||
"typescript": "^2.0.10" | ||
"@types/chai": "3.4.34", | ||
"@types/cheerio": "0.17.31", | ||
"@types/glob": "5.0.30", | ||
"@types/mocha": "2.2.34", | ||
"chai": "3.5.0", | ||
"mocha": "3.2.0", | ||
"ts-node": "1.7.2", | ||
"tslint": "4.1.1", | ||
"tslint-eslint-rules": "3.2.0", | ||
"typescript": "2.0.10" | ||
}, | ||
"dependencies": { | ||
"cheerio": "~0.22.0", | ||
"cli": "^1.0.1", | ||
"cheerio": "0.22.0", | ||
"cli": "1.0.1", | ||
"fs": "0.0.1-security", | ||
"gettext-parser": "^1.2.1", | ||
"glob": "^7.1.1", | ||
"path": "^0.12.7" | ||
"gettext-parser": "1.2.1", | ||
"glob": "7.1.1", | ||
"path": "0.12.7" | ||
} | ||
} |
# ng2-translate-extract | ||
Extract strings from projects using ng2-translate to json or pot files. | ||
Extract translatable (ng2-translate) strings and save as a JSON or Gettext pot file. | ||
Merges with existing strings if the output file already exists. | ||
**THIS IS STILL VERY MUCH A WORK IN PROGRESS** | ||
## Usage | ||
If you only need to extract strings from one project, you can install the package locally: | ||
Install the package in your project: | ||
`npm install @biesbjerg/ng2-translate-extract --save-dev` | ||
Add the following `extract` script your project's `package.json`: | ||
Add an `extract` script to your project's `package.json`: | ||
``` | ||
"scripts": { | ||
"extract": "ng2-translate-extract --dir ./src --output ./ --format=json" | ||
"extract": "ng2-translate-extract --dir ./src --output ./ --format=json --clean" | ||
} | ||
@@ -21,10 +20,2 @@ ``` | ||
## Global install | ||
You can also install the package globally: | ||
`npm install @biesbjerg/ng2-translate-extract -g` | ||
Now you can execute the script from everywhere: | ||
`ng2-translate-extract --dir /extract/from/this/dir --output /save/to/this/dir --format json --clean` | ||
## Commandline arguments | ||
@@ -41,5 +32,5 @@ ``` | ||
-r, --replace BOOLEAN Replace the contents of output file if it exists | ||
(merging by default) | ||
-c, --clean BOOLEAN Remove unused keys when merging | ||
(Merges by default) | ||
-c, --clean BOOLEAN Remove obsolete strings when merging | ||
-h, --help Display help and usage details | ||
``` |
35561
35
+ Addedencoding@0.1.12(transitive)
+ Addedgettext-parser@1.2.1(transitive)
+ Addedglob@7.1.1(transitive)
+ Addediconv-lite@0.4.24(transitive)
- Removedencoding@0.1.13(transitive)
- Removedgettext-parser@1.4.0(transitive)
- Removedglob@7.2.3(transitive)
- Removediconv-lite@0.6.3(transitive)
Updatedcheerio@0.22.0
Updatedcli@1.0.1
Updatedgettext-parser@1.2.1
Updatedglob@7.1.1
Updatedpath@0.12.7