Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@biesbjerg/ng2-translate-extract

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@biesbjerg/ng2-translate-extract - npm Package Compare versions

Comparing version 0.2.9 to 0.3.0

32

package.json
{
"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
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc