forked from biesbjerg/ngx-translate-extract
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
56457c7
commit 2af42ba
Showing
75 changed files
with
1,413 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ npm-debug.log* | |
.DS_Store | ||
|
||
# Compiled files | ||
dist | ||
src/**/*.js | ||
tests/**/*.js | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#! /usr/bin/env node | ||
|
||
require('../dist/cli/cli.js'); | ||
import('../dist/cli/cli.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export declare const cli: any; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { TranslationCollection } from '../../utils/translation.collection.js'; | ||
import { TaskInterface } from './task.interface.js'; | ||
import { ParserInterface } from '../../parsers/parser.interface.js'; | ||
import { PostProcessorInterface } from '../../post-processors/post-processor.interface.js'; | ||
import { CompilerInterface } from '../../compilers/compiler.interface.js'; | ||
export interface ExtractTaskOptionsInterface { | ||
replace?: boolean; | ||
} | ||
export declare class ExtractTask implements TaskInterface { | ||
protected inputs: string[]; | ||
protected outputs: string[]; | ||
protected options: ExtractTaskOptionsInterface; | ||
protected parsers: ParserInterface[]; | ||
protected postProcessors: PostProcessorInterface[]; | ||
protected compiler: CompilerInterface; | ||
constructor(inputs: string[], outputs: string[], options?: ExtractTaskOptionsInterface); | ||
execute(): void; | ||
setParsers(parsers: ParserInterface[]): this; | ||
setPostProcessors(postProcessors: PostProcessorInterface[]): this; | ||
setCompiler(compiler: CompilerInterface): this; | ||
protected extract(): TranslationCollection; | ||
protected process(draft: TranslationCollection, extracted: TranslationCollection, existing: TranslationCollection): TranslationCollection; | ||
protected save(output: string, collection: TranslationCollection): void; | ||
protected getFiles(pattern: string): string[]; | ||
protected out(...args: any[]): void; | ||
protected printEnabledParsers(): void; | ||
protected printEnabledPostProcessors(): void; | ||
protected printEnabledCompiler(): void; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface TaskInterface { | ||
execute(): void; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { CompilerInterface } from '../compilers/compiler.interface.js'; | ||
export declare class CompilerFactory { | ||
static create(format: string, options?: {}): CompilerInterface; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { TranslationCollection } from '../utils/translation.collection.js'; | ||
export interface CompilerInterface { | ||
extension: string; | ||
compile(collection: TranslationCollection): string; | ||
parse(contents: string): TranslationCollection; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { CompilerInterface } from './compiler.interface.js'; | ||
import { TranslationCollection } from '../utils/translation.collection.js'; | ||
export declare class JsonCompiler implements CompilerInterface { | ||
indentation: string; | ||
extension: string; | ||
constructor(options?: any); | ||
compile(collection: TranslationCollection): string; | ||
parse(contents: string): TranslationCollection; | ||
protected isNamespacedJsonFormat(values: any): boolean; | ||
} |
Oops, something went wrong.