mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-27 11:05:46 +03:00
Add starting design for separate routes module.
This commit is contained in:
parent
8c4990551c
commit
2722df72f7
@ -38,14 +38,13 @@ async function writeFiles() {
|
||||
"./elm-stuff/elm-pages/Pages.elm",
|
||||
elmPagesCliFile(staticRoutes)
|
||||
);
|
||||
const cliCode = generateTemplateModuleConnector("cli");
|
||||
fs.writeFileSync(
|
||||
"./elm-stuff/elm-pages/TemplateModulesBeta.elm",
|
||||
generateTemplateModuleConnector("cli")
|
||||
);
|
||||
fs.writeFileSync(
|
||||
"./gen/TemplateModulesBeta.elm",
|
||||
generateTemplateModuleConnector("browser")
|
||||
cliCode.mainModule
|
||||
);
|
||||
const browserCode = generateTemplateModuleConnector("browser");
|
||||
fs.writeFileSync("./gen/TemplateModulesBeta.elm", browserCode.mainModule);
|
||||
|
||||
// write modified elm.json to elm-stuff/elm-pages/
|
||||
copyModifiedElmJson();
|
||||
|
@ -15,7 +15,8 @@ function generateTemplateModuleConnector(phase) {
|
||||
}
|
||||
});
|
||||
|
||||
return `module TemplateModulesBeta exposing (..)
|
||||
return {
|
||||
mainModule: `module TemplateModulesBeta exposing (..)
|
||||
|
||||
import Browser
|
||||
import Pages.Internal.Platform
|
||||
@ -389,7 +390,9 @@ mapDocument document =
|
||||
|
||||
mapBoth fnA fnB ( a, b, c ) =
|
||||
( fnA a, fnB b, c )
|
||||
`;
|
||||
`,
|
||||
routesModule: ``,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user