Update build
parent
04f2130f64
commit
3dfd6cb632
|
@ -1,5 +1,6 @@
|
||||||
/.*
|
/.*
|
||||||
!/.gitignore
|
!/.gitignore
|
||||||
|
!/.travis.yml
|
||||||
/bower_components/
|
/bower_components/
|
||||||
/node_modules/
|
/node_modules/
|
||||||
/output/
|
/output/
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
language: node_js
|
||||||
|
dist: trusty
|
||||||
|
sudo: required
|
||||||
|
node_js: 5
|
||||||
|
install:
|
||||||
|
- npm install -g bower
|
||||||
|
- npm install
|
||||||
|
script:
|
||||||
|
- npm run build
|
||||||
|
after_success:
|
||||||
|
- >-
|
||||||
|
test $TRAVIS_TAG &&
|
||||||
|
node_modules/.bin/psc-publish > .pursuit.json &&
|
||||||
|
curl -X POST http://pursuit.purescript.org/packages \
|
||||||
|
-d @.pursuit.json \
|
||||||
|
-H 'Accept: application/json' \
|
||||||
|
-H "Authorization: token ${GITHUB_TOKEN}"
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "pulp dep install",
|
"postinstall": "bower install",
|
||||||
"build": "pulp browserify --optimise --to dist/app.js",
|
"build": "pulp browserify --optimise --to dist/app.js",
|
||||||
"watch": "pulp -w browserify --to dist/app.js"
|
"watch": "pulp -w browserify --to dist/app.js"
|
||||||
},
|
},
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
"virtual-dom": "^2.1.1"
|
"virtual-dom": "^2.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"pulp": "^7.0.0",
|
"pulp": "^8.1.0",
|
||||||
"purescript": "^0.7.6"
|
"purescript": "^0.7.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,12 @@ module Main where
|
||||||
|
|
||||||
import Prelude
|
import Prelude
|
||||||
|
|
||||||
import Control.Monad.Aff (runAff)
|
|
||||||
import Control.Monad.Eff (Eff())
|
import Control.Monad.Eff (Eff())
|
||||||
import Control.Monad.Eff.Exception (throwException)
|
|
||||||
|
|
||||||
import Halogen
|
import Halogen
|
||||||
import Halogen.Util (awaitBody)
|
import Halogen.Util (awaitBody, runHalogenAff)
|
||||||
import qualified Halogen.HTML.Indexed as H
|
import Halogen.HTML.Indexed as H
|
||||||
import qualified Halogen.HTML.Events.Indexed as E
|
import Halogen.HTML.Events.Indexed as E
|
||||||
|
|
||||||
data Query a = ToggleState a
|
data Query a = ToggleState a
|
||||||
|
|
||||||
|
@ -18,7 +16,7 @@ type State = { on :: Boolean }
|
||||||
initialState :: State
|
initialState :: State
|
||||||
initialState = { on: false }
|
initialState = { on: false }
|
||||||
|
|
||||||
ui :: forall g. (Functor g) => Component State Query g
|
ui :: forall g. Component State Query g
|
||||||
ui = component { render, eval }
|
ui = component { render, eval }
|
||||||
where
|
where
|
||||||
|
|
||||||
|
@ -44,6 +42,6 @@ ui = component { render, eval }
|
||||||
pure next
|
pure next
|
||||||
|
|
||||||
main :: Eff (HalogenEffects ()) Unit
|
main :: Eff (HalogenEffects ()) Unit
|
||||||
main = runAff throwException (const (pure unit)) $ do
|
main = runHalogenAff do
|
||||||
body <- awaitBody
|
body <- awaitBody
|
||||||
runUI ui initialState body
|
runUI ui initialState body
|
||||||
|
|
Loading…
Reference in New Issue