Fork this repo, write some code and submit a pull request into the develop branch.
This guide assumes you have yarn, purescript and spago already installed.
Clone this repo. Install the dependencies with:
yarn
Then you need to do the initial build for all the purescript with:
spago build
To start the dev server use the dev
command:
yarn dev
To generate a production build run:
yarn build
This project uses hygen for code generation.
If you want to contribute a new generator add it to the
_templates
folder
To create a component you can run:
yarn hygen purescript component Foo.Bar
This will create an empty halogen component in src/Component/Foo/Bar.purs
which lives in a module called Lunarbox.Component.Foo.Bar
.
You can add the -p flag at the end to generate a page instead (lives in
src/Page
and has the module name prefixed withLunarbox.Page
)
You can also use the render-function action when you want to build a render-function which takes some Input and some Actions as it's parameters
To create a simple purescript module use can use the module
action from the purescript
generator:
yarn purescript module Foo.Bar
This will create an empty purescript module in src/Foo/Bar.purs
called Lunarbox.Foo.Bar
which has a single import to Prelude
.