Update build

master
Gary Burgess 2016-03-24 17:22:10 +00:00
parent 04f2130f64
commit 3dfd6cb632
4 changed files with 25 additions and 9 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
/.*
!/.gitignore
!/.travis.yml
/bower_components/
/node_modules/
/output/

17
.travis.yml Normal file
View File

@ -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}"

View File

@ -1,7 +1,7 @@
{
"private": true,
"scripts": {
"postinstall": "pulp dep install",
"postinstall": "bower install",
"build": "pulp browserify --optimise --to dist/app.js",
"watch": "pulp -w browserify --to dist/app.js"
},
@ -9,7 +9,7 @@
"virtual-dom": "^2.1.1"
},
"devDependencies": {
"pulp": "^7.0.0",
"pulp": "^8.1.0",
"purescript": "^0.7.6"
}
}

View File

@ -2,14 +2,12 @@ module Main where
import Prelude
import Control.Monad.Aff (runAff)
import Control.Monad.Eff (Eff())
import Control.Monad.Eff.Exception (throwException)
import Halogen
import Halogen.Util (awaitBody)
import qualified Halogen.HTML.Indexed as H
import qualified Halogen.HTML.Events.Indexed as E
import Halogen.Util (awaitBody, runHalogenAff)
import Halogen.HTML.Indexed as H
import Halogen.HTML.Events.Indexed as E
data Query a = ToggleState a
@ -18,7 +16,7 @@ type State = { on :: Boolean }
initialState :: State
initialState = { on: false }
ui :: forall g. (Functor g) => Component State Query g
ui :: forall g. Component State Query g
ui = component { render, eval }
where
@ -44,6 +42,6 @@ ui = component { render, eval }
pure next
main :: Eff (HalogenEffects ()) Unit
main = runAff throwException (const (pure unit)) $ do
main = runHalogenAff do
body <- awaitBody
runUI ui initialState body