SimpleCompilerBase
Extends:
This class implements all of the async methods of CompilerBase by just calling the sync version. Use it to save some time when implementing simple compilers.
To use it, implement the compile method, the getCompilerVersion method, and the getInputMimeTypes static method.
Constructor Summary
Public Constructor | ||
public |
|
Method Summary
Public Methods | ||
public |
compile(sourceCode: *, filePath: *, compilerContext: *): * |
|
public |
determineDependentFiles(sourceCode: *, filePath: *, compilerContext: *): * |
|
public |
determineDependentFilesSync(sourceCode: *, filePath: *, compilerContext: *): * |
|
public |
shouldCompileFile(fileName: *, compilerContext: *): boolean |
|
public |
shouldCompileFileSync(fileName: *, compilerContext: *): boolean |
Inherited Summary
From class CompilerBase | ||
public static abstract |
getInputMimeTypes(): string[] This method describes the MIME types that your compiler supports as input. |
|
public |
|
|
public abstract |
Compiles the file |
|
public abstract |
compileSync(sourceCode: string, fileName: string, compilerContext: object): object Compiles the file |
|
public abstract |
determineDependentFiles(sourceCode: string, fileName: string, compilerContext: object): string[] Returns the dependent files of this file. |
|
public abstract |
determineDependentFilesSync(sourceCode: string, fileName: string, compilerContext: object): string[] Returns the dependent files of this file. |
|
public abstract |
Returns a version number representing the version of the underlying compiler library. |
|
public abstract |
shouldCompileFile(fileName: string, compilerContext: object): bool Determines whether a file should be compiled |
|
public abstract |
shouldCompileFileSync(fileName: string, compilerContext: object): bool Determines whether a file should be compiled |
Public Constructors
Public Methods
public compile(sourceCode: *, filePath: *, compilerContext: *): * source
Override:
CompilerBase#compileParams:
Name | Type | Attribute | Description |
sourceCode | * | ||
filePath | * | ||
compilerContext | * |
Return:
* |
public determineDependentFiles(sourceCode: *, filePath: *, compilerContext: *): * source
Override:
CompilerBase#determineDependentFilesParams:
Name | Type | Attribute | Description |
sourceCode | * | ||
filePath | * | ||
compilerContext | * |
Return:
* |
public determineDependentFilesSync(sourceCode: *, filePath: *, compilerContext: *): * source
Params:
Name | Type | Attribute | Description |
sourceCode | * | ||
filePath | * | ||
compilerContext | * |
Return:
* |
public shouldCompileFile(fileName: *, compilerContext: *): boolean source
Override:
CompilerBase#shouldCompileFileParams:
Name | Type | Attribute | Description |
fileName | * | ||
compilerContext | * |
public shouldCompileFileSync(fileName: *, compilerContext: *): boolean source
Override:
CompilerBase#shouldCompileFileSyncParams:
Name | Type | Attribute | Description |
fileName | * | ||
compilerContext | * |