mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-27 05:44:17 +03:00
Generate Template.elm module.
This commit is contained in:
parent
3aa978578b
commit
b26d05b88c
0
generator/src/codegen-template-builder.js
Normal file
0
generator/src/codegen-template-builder.js
Normal file
@ -47,6 +47,11 @@ async function writeFiles(markdownContent) {
|
||||
ensureDirSync("./elm-stuff");
|
||||
ensureDirSync("./gen");
|
||||
ensureDirSync("./elm-stuff/elm-pages");
|
||||
fs.copyFileSync(path.join(__dirname, `./Template.elm`), `./gen/Template.elm`);
|
||||
fs.copyFileSync(
|
||||
path.join(__dirname, `./Template.elm`),
|
||||
`./elm-stuff/elm-pages/Template.elm`
|
||||
);
|
||||
|
||||
// prevent compilation errors if migrating from previous elm-pages version
|
||||
deleteIfExists("./elm-stuff/elm-pages/Pages/ContentCache.elm");
|
||||
|
@ -36,6 +36,7 @@ module.exports = function run(mode, staticRoutes, markdownContent) {
|
||||
|
||||
global.previousUiFileContent = uiFileContent;
|
||||
|
||||
fs.copyFileSync(path.join(__dirname, `./Template.elm`), `./gen/Template.elm`);
|
||||
// write `Pages.elm` with cli interface
|
||||
fs.writeFileSync(
|
||||
"./elm-stuff/elm-pages/Pages.elm",
|
||||
|
Loading…
Reference in New Issue
Block a user