commit
cebbb9fd48
|
@ -5,3 +5,4 @@
|
||||||
/node_modules/
|
/node_modules/
|
||||||
/output/
|
/output/
|
||||||
/dist/app.js
|
/dist/app.js
|
||||||
|
package-lock.json
|
||||||
|
|
|
@ -9,7 +9,9 @@
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"purescript-console": "^3.0.0",
|
"purescript-halogen": "^4.0.0",
|
||||||
"purescript-halogen": "^2.0.0"
|
"purescript-prelude": "^4.1.0",
|
||||||
|
"purescript-console": "^4.1.0",
|
||||||
|
"purescript-effect": "^2.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
11
package.json
11
package.json
|
@ -3,12 +3,13 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "pulp build --to dist/app.js",
|
"build": "pulp build --to dist/app.js",
|
||||||
"watch": "pulp -w build --to dist/app.js",
|
"watch": "pulp -w build --to dist/app.js",
|
||||||
"watch-fast": "webpack --entry ./entry.js --output-filename dist/app.js --progress --watch"
|
"watch-fast": "webpack --mode=development --entry ./entry.js --output-path ./dist --output-filename app.js --progress --watch"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"pulp": "^12.0.1",
|
"pulp": "^12.3.0",
|
||||||
"purescript": "^0.11.6",
|
"purescript": "^0.12.0",
|
||||||
"purescript-psa": "^0.5.1",
|
"purescript-psa": "^0.7.2",
|
||||||
"webpack": "^3.6.0"
|
"webpack": "^4.16.2",
|
||||||
|
"webpack-cli": "^3.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,5 +44,5 @@ component =
|
||||||
eval :: Query ~> H.ComponentDSL State Query Void m
|
eval :: Query ~> H.ComponentDSL State Query Void m
|
||||||
eval = case _ of
|
eval = case _ of
|
||||||
ToggleState next -> do
|
ToggleState next -> do
|
||||||
H.modify (\state -> { on: not state.on })
|
_ <- H.modify (\state -> { on: not state.on })
|
||||||
pure next
|
pure next
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
import Prelude
|
import Prelude
|
||||||
import Control.Monad.Eff (Eff)
|
import Effect (Effect)
|
||||||
import Halogen.Aff as HA
|
import Halogen.Aff as HA
|
||||||
import Halogen.VDom.Driver (runUI)
|
import Halogen.VDom.Driver (runUI)
|
||||||
|
|
||||||
import Component (component)
|
import Component (component)
|
||||||
|
|
||||||
main :: Eff (HA.HalogenEffects ()) Unit
|
main :: Effect Unit
|
||||||
main = HA.runHalogenAff do
|
main = HA.runHalogenAff do
|
||||||
body <- HA.awaitBody
|
body <- HA.awaitBody
|
||||||
runUI component unit body
|
runUI component unit body
|
||||||
|
|
Loading…
Reference in New Issue