Last active
February 14, 2019 05:21
-
-
Save adamdbradley/74db2dd9c0fc02e77fb7abea0a704f6f to your computer and use it in GitHub Desktop.
Stencil Compiler
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
// create the compiler instance | |
const compiler = new Compiler(); | |
// compiler.fs is the same as node "fs", and always async | |
await compiler.fs.writeFile('cmp-a.tsx', '....'); | |
// kick off the first build | |
let results = await compiler.build(); | |
// do an update to the file | |
await compiler.fs.writeFile('cmp-a.tsx', '....'); | |
// kick off the second build | |
results = await compiler.build(); | |
{ | |
'cmp-a.tsx': { | |
jsPath: 'cmp-a.js', | |
code: '....' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment