Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
bcb4a9c069 | ||
|
5ad1fe6a18 | ||
|
bc5ce7e80d | ||
|
030ab145d6 |
@@ -82,6 +82,8 @@ Options:
|
||||
--output, -o Paths where you would like to save extracted
|
||||
strings. You can use path expansion, glob patterns
|
||||
and multiple paths [array] [required]
|
||||
--marker, -m Extract strings passed to a marker function
|
||||
[string] [default: false]
|
||||
--format, -f Output format
|
||||
[string] [choices: "json", "namespaced-json", "pot"] [default: "json"]
|
||||
--format-indentation, --fi Output format indentation [string] [default: "\t"]
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@biesbjerg/ngx-translate-extract",
|
||||
"version": "2.2.0",
|
||||
"version": "2.2.1",
|
||||
"description": "Extract strings from projects using ngx-translate",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
|
@@ -104,7 +104,7 @@ export class ExtractTask implements TaskInterface {
|
||||
|
||||
if (this._options.clean) {
|
||||
const collectionCount = processedCollection.count();
|
||||
processedCollection = processedCollection.intersect(processedCollection);
|
||||
processedCollection = processedCollection.intersect(collection);
|
||||
const removeCount = collectionCount - processedCollection.count();
|
||||
if (removeCount > 0) {
|
||||
this._out(chalk.dim('- removed %d obsolete strings'), removeCount);
|
||||
|
@@ -48,7 +48,11 @@ export abstract class AbstractAstParser {
|
||||
}, initialValue);
|
||||
}
|
||||
|
||||
protected _printAllChildren(sourceFile: ts.SourceFile, node: ts.Node, depth = 0) {
|
||||
protected _syntaxKindToName(kind: ts.SyntaxKind): string {
|
||||
return ts.SyntaxKind[kind];
|
||||
}
|
||||
|
||||
protected _printAllChildren(sourceFile: ts.SourceFile, node: ts.Node, depth = 0): void {
|
||||
console.log(
|
||||
new Array(depth + 1).join('----'),
|
||||
`[${node.kind}]`,
|
||||
@@ -62,8 +66,4 @@ export abstract class AbstractAstParser {
|
||||
node.getChildren(sourceFile).forEach(childNode => this._printAllChildren(sourceFile, childNode, depth));
|
||||
}
|
||||
|
||||
protected _syntaxKindToName(kind: ts.SyntaxKind) {
|
||||
return ts.SyntaxKind[kind];
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
import * as ts from 'typescript';
|
||||
|
||||
export function _(key: string | string[]): string | string[] {
|
||||
return key;
|
||||
}
|
||||
|
Reference in New Issue
Block a user