Ben Ashton
2 years ago
11 changed files with 5088 additions and 152 deletions
@ -0,0 +1,4 @@ |
|||||||
|
# Preserve directory, but ignore contents |
||||||
|
* |
||||||
|
*/ |
||||||
|
!.gitignore |
@ -1 +1 @@ |
|||||||
export { TemplateEngine, renderFile } from './src/template_engine.js'; |
export { TemplateEngine, renderFile } from './src/template_engine.mjs'; |
@ -1,4 +1,4 @@ |
|||||||
import { TokenStream } from './token_stream.js'; |
import { TokenStream } from './token_stream.mjs'; |
||||||
|
|
||||||
export class TemplateEngine { |
export class TemplateEngine { |
||||||
async render(fileName) { |
async render(fileName) { |
@ -1,5 +1,5 @@ |
|||||||
import { CharacterStream } from './character_stream.js'; |
import { CharacterStream } from './character_stream.mjs'; |
||||||
import { TemplateSyntaxError } from './errors/template_syntax_error.js'; |
import { TemplateSyntaxError } from './errors/template_syntax_error.mjs'; |
||||||
|
|
||||||
export class TokenStream { |
export class TokenStream { |
||||||
static OPEN_INLINE = '<%'; |
static OPEN_INLINE = '<%'; |
@ -0,0 +1,15 @@ |
|||||||
|
import * as url from 'url'; |
||||||
|
import path from 'path'; |
||||||
|
const __dirname = url.fileURLToPath(new URL('.', import.meta.url)); |
||||||
|
|
||||||
|
export default { |
||||||
|
mode: 'development', |
||||||
|
target: 'node', |
||||||
|
entry: path.join(__dirname, 'cli.mjs'), |
||||||
|
experiments: { |
||||||
|
topLevelAwait: true |
||||||
|
}, |
||||||
|
output: { |
||||||
|
filename: 'cli.js' |
||||||
|
} |
||||||
|
}; |
Loading…
Reference in new issue