mirror of
https://github.com/dillonkearns/elm-pages.git
synced 2024-10-26 10:27:36 +03:00
Move SharedTemplate to copied gen folder.
This commit is contained in:
parent
3a8db2f7cb
commit
62675b6a16
@ -1,46 +0,0 @@
|
||||
module SharedTemplate exposing (..)
|
||||
|
||||
import Browser.Navigation
|
||||
import DataSource
|
||||
import Document exposing (Document)
|
||||
import Html exposing (Html)
|
||||
import Pages.PagePath exposing (PagePath)
|
||||
import Route exposing (Route)
|
||||
|
||||
|
||||
type alias SharedTemplate msg sharedModel sharedData sharedMsg mappedMsg =
|
||||
{ init :
|
||||
Maybe Browser.Navigation.Key
|
||||
->
|
||||
Maybe
|
||||
{ path :
|
||||
{ path : PagePath
|
||||
, query : Maybe String
|
||||
, fragment : Maybe String
|
||||
}
|
||||
, metadata : Maybe Route
|
||||
}
|
||||
-> ( sharedModel, Cmd msg )
|
||||
, update : msg -> sharedModel -> ( sharedModel, Cmd msg )
|
||||
, view :
|
||||
sharedData
|
||||
->
|
||||
{ path : PagePath
|
||||
, frontmatter : Maybe Route
|
||||
}
|
||||
-> sharedModel
|
||||
-> (msg -> mappedMsg)
|
||||
-> Document mappedMsg
|
||||
-> { body : Html mappedMsg, title : String }
|
||||
, data : DataSource.DataSource sharedData
|
||||
, subscriptions : PagePath -> sharedModel -> Sub msg
|
||||
, onPageChange :
|
||||
Maybe
|
||||
({ path : PagePath
|
||||
, query : Maybe String
|
||||
, fragment : Maybe String
|
||||
}
|
||||
-> msg
|
||||
)
|
||||
, sharedMsg : sharedMsg -> msg
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
module SharedTemplate exposing (..)
|
||||
|
||||
import Browser.Navigation
|
||||
import DataSource
|
||||
import Document exposing (Document)
|
||||
import Html exposing (Html)
|
||||
import Pages.PagePath exposing (PagePath)
|
||||
import Route exposing (Route)
|
||||
|
||||
|
||||
type alias SharedTemplate msg sharedModel sharedData sharedMsg mappedMsg =
|
||||
{ init :
|
||||
Maybe Browser.Navigation.Key
|
||||
->
|
||||
Maybe
|
||||
{ path :
|
||||
{ path : PagePath
|
||||
, query : Maybe String
|
||||
, fragment : Maybe String
|
||||
}
|
||||
, metadata : Maybe Route
|
||||
}
|
||||
-> ( sharedModel, Cmd msg )
|
||||
, update : msg -> sharedModel -> ( sharedModel, Cmd msg )
|
||||
, view :
|
||||
sharedData
|
||||
->
|
||||
{ path : PagePath
|
||||
, frontmatter : Maybe Route
|
||||
}
|
||||
-> sharedModel
|
||||
-> (msg -> mappedMsg)
|
||||
-> Document mappedMsg
|
||||
-> { body : Html mappedMsg, title : String }
|
||||
, data : DataSource.DataSource sharedData
|
||||
, subscriptions : PagePath -> sharedModel -> Sub msg
|
||||
, onPageChange :
|
||||
Maybe
|
||||
({ path : PagePath
|
||||
, query : Maybe String
|
||||
, fragment : Maybe String
|
||||
}
|
||||
-> msg
|
||||
)
|
||||
, sharedMsg : sharedMsg -> msg
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
module SharedTemplate exposing (..)
|
||||
|
||||
import Browser.Navigation
|
||||
import DataSource
|
||||
import Document exposing (Document)
|
||||
import Html exposing (Html)
|
||||
import Pages.PagePath exposing (PagePath)
|
||||
import Route exposing (Route)
|
||||
|
||||
|
||||
type alias SharedTemplate msg sharedModel sharedData sharedMsg mappedMsg =
|
||||
{ init :
|
||||
Maybe Browser.Navigation.Key
|
||||
->
|
||||
Maybe
|
||||
{ path :
|
||||
{ path : PagePath
|
||||
, query : Maybe String
|
||||
, fragment : Maybe String
|
||||
}
|
||||
, metadata : Maybe Route
|
||||
}
|
||||
-> ( sharedModel, Cmd msg )
|
||||
, update : msg -> sharedModel -> ( sharedModel, Cmd msg )
|
||||
, view :
|
||||
sharedData
|
||||
->
|
||||
{ path : PagePath
|
||||
, frontmatter : Maybe Route
|
||||
}
|
||||
-> sharedModel
|
||||
-> (msg -> mappedMsg)
|
||||
-> Document mappedMsg
|
||||
-> { body : Html mappedMsg, title : String }
|
||||
, data : DataSource.DataSource sharedData
|
||||
, subscriptions : PagePath -> sharedModel -> Sub msg
|
||||
, onPageChange :
|
||||
Maybe
|
||||
({ path : PagePath
|
||||
, query : Maybe String
|
||||
, fragment : Maybe String
|
||||
}
|
||||
-> msg
|
||||
)
|
||||
, sharedMsg : sharedMsg -> msg
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
module SharedTemplate exposing (..)
|
||||
module SharedTemplate exposing (SharedTemplate)
|
||||
|
||||
import Browser.Navigation
|
||||
import DataSource
|
@ -23,6 +23,14 @@ async function writeFiles() {
|
||||
path.join(__dirname, `./Page.elm`),
|
||||
`./elm-stuff/elm-pages/Page.elm`
|
||||
);
|
||||
fs.copyFileSync(
|
||||
path.join(__dirname, `./SharedTemplate.elm`),
|
||||
`./gen/SharedTemplate.elm`
|
||||
);
|
||||
fs.copyFileSync(
|
||||
path.join(__dirname, `./SharedTemplate.elm`),
|
||||
`./elm-stuff/elm-pages/SharedTemplate.elm`
|
||||
);
|
||||
|
||||
// prevent compilation errors if migrating from previous elm-pages version
|
||||
deleteIfExists("./elm-stuff/elm-pages/Pages/ContentCache.elm");
|
||||
|
@ -1,46 +0,0 @@
|
||||
module SharedTemplate exposing (..)
|
||||
|
||||
import Browser.Navigation
|
||||
import DataSource
|
||||
import Document exposing (Document)
|
||||
import Html exposing (Html)
|
||||
import Pages.PagePath exposing (PagePath)
|
||||
import Route exposing (Route)
|
||||
|
||||
|
||||
type alias SharedTemplate msg sharedModel sharedData sharedMsg mappedMsg =
|
||||
{ init :
|
||||
Maybe Browser.Navigation.Key
|
||||
->
|
||||
Maybe
|
||||
{ path :
|
||||
{ path : PagePath
|
||||
, query : Maybe String
|
||||
, fragment : Maybe String
|
||||
}
|
||||
, metadata : Maybe Route
|
||||
}
|
||||
-> ( sharedModel, Cmd msg )
|
||||
, update : msg -> sharedModel -> ( sharedModel, Cmd msg )
|
||||
, view :
|
||||
sharedData
|
||||
->
|
||||
{ path : PagePath
|
||||
, frontmatter : Maybe Route
|
||||
}
|
||||
-> sharedModel
|
||||
-> (msg -> mappedMsg)
|
||||
-> Document mappedMsg
|
||||
-> { body : Html mappedMsg, title : String }
|
||||
, data : DataSource.DataSource sharedData
|
||||
, subscriptions : PagePath -> sharedModel -> Sub msg
|
||||
, onPageChange :
|
||||
Maybe
|
||||
({ path : PagePath
|
||||
, query : Maybe String
|
||||
, fragment : Maybe String
|
||||
}
|
||||
-> msg
|
||||
)
|
||||
, sharedMsg : sharedMsg -> msg
|
||||
}
|
Loading…
Reference in New Issue
Block a user