Move readme again

This commit is contained in:
Kim Biesbjerg
2019-06-24 12:45:04 +02:00
parent 96d53476f9
commit 3dd89304c6
2 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
## Mark strings for extraction using a marker function
If, for some reason, you want to extract strings not passed directly to `TranslateService`'s `get()` or `instant()` methods, you can wrap them in a custom marker function to let `ngx-translate-extract` know you want to extract them.
Install marker function:
`npm install @biesbjerg/ngx-translate-extract-marker`
```ts
import { extract } from '@biesbjerg/ngx-translate-extract-marker';
extract('Extract me');
```
Add the `marker` argument when running the extract script:
`ngx-translate-extract ... -m extract`
You can alias the marker function if needed:
```ts
import { extract as _ } from '@biesbjerg/ngx-translate-extract-marker';
_('Extract me');
```
`ngx-translate-extract ... -m _`

View File

@@ -1,7 +1,7 @@
{
"name": "@biesbjerg/ngx-translate-extract-marker",
"description": "Function to manually mark strings to be extracted using ngx-translate-extract",
"version": "0.0.1",
"version": "0.0.2",
"repository": {
"type": "git",
"url": "https://github.com/biesbjerg/ngx-translate-extract-marker.git"