rename extract to marker

This commit is contained in:
Kim Biesbjerg 2019-06-25 13:12:52 +02:00
parent 3dd89304c6
commit a02c29f0e2
3 changed files with 9 additions and 8 deletions

View File

@ -5,21 +5,21 @@ Install marker function:
`npm install @biesbjerg/ngx-translate-extract-marker` `npm install @biesbjerg/ngx-translate-extract-marker`
```ts ```ts
import { extract } from '@biesbjerg/ngx-translate-extract-marker'; import { marker } from '@biesbjerg/ngx-translate-extract-marker';
extract('Extract me'); marker('Extract me');
``` ```
Add the `marker` argument when running the extract script: Add the `marker` argument when running the extract script:
`ngx-translate-extract ... -m extract` `ngx-translate-extract ... --marker marker`
You can alias the marker function if needed: You can alias the marker function if needed:
```ts ```ts
import { extract as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
_('Extract me'); _('Extract me');
``` ```
`ngx-translate-extract ... -m _` `ngx-translate-extract ... --marker _`

View File

@ -1,7 +1,7 @@
{ {
"name": "@biesbjerg/ngx-translate-extract-marker", "name": "@biesbjerg/ngx-translate-extract-marker",
"description": "Function to manually mark strings to be extracted using ngx-translate-extract", "description": "Function to manually mark strings to be extracted using ngx-translate-extract",
"version": "0.0.2", "version": "1.0.0",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/biesbjerg/ngx-translate-extract-marker.git" "url": "https://github.com/biesbjerg/ngx-translate-extract-marker.git"
@ -15,6 +15,7 @@
"keywords": [ "keywords": [
"angular", "angular",
"ngx-translate", "ngx-translate",
"ngx-translate-extract" "ngx-translate-extract",
"i18n"
] ]
} }

View File

@ -1,3 +1,3 @@
export function extract<T extends string | string[]>(key: T): T { export function marker<T extends string | string[]>(key: T): T {
return key; return key;
} }