This repository has been archived by the owner on Sep 24, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Abstracted server render expression result
The result of compiling a node to be server rendered is non specific to a language (at templating level, expressions are still js ast nodes). Converted ts module compilation to accept this middle step. Renamed some chef interfaces
- Loading branch information
1 parent
2a3745f
commit 47ebc72
Showing
24 changed files
with
231 additions
and
180 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
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
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
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,19 +1,20 @@ | ||
import { IFile } from "./filesystem"; | ||
import { IConstruct, IRenderOptions, IRenderSettings } from "./helpers"; | ||
import { IRenderable, IRenderOptions, IRenderSettings } from "./helpers"; | ||
|
||
export abstract class AbstractModule<T> implements IFile, IConstruct { | ||
constructor(public filename: string, public statements: Array<T>) { } | ||
abstract render(settings?: Partial<IRenderSettings>, options?: Partial<IRenderOptions>): string; | ||
export interface IModule extends IFile, IRenderable { | ||
statements: Array<any>; | ||
|
||
render(settings?: Partial<IRenderSettings>, options?: Partial<IRenderOptions>): string; | ||
|
||
abstract writeToFile(settings?: Partial<IRenderSettings>): void; | ||
writeToFile(settings?: Partial<IRenderSettings>): void; | ||
|
||
abstract addExport(exportable: AbstractFunctionDeclaration | any): void; | ||
abstract addImport(importName: any, from: string): void; | ||
addExport(exportable: IFunctionDeclaration | any): void; | ||
addImport(importName: any, from: string): void; | ||
} | ||
|
||
export abstract class AbstractFunctionDeclaration { | ||
export interface IFunctionDeclaration extends IRenderable { | ||
statements: Array<any>; | ||
|
||
abstract buildArgumentListFromArgumentsMap(argumentMap: Map<string, any>): any; | ||
abstract actualName: string | null; | ||
buildArgumentListFromArgumentsMap(argumentMap: Map<string, any>): any; | ||
actualName: string | null; | ||
} |
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
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
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
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
Oops, something went wrong.