Remove elm.js and split out Main.elm
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
elm-stuff
|
||||
node_modules
|
||||
elm.js
|
||||
|
||||
10728
stages/1/elm.js
10728
stages/1/elm.js
File diff suppressed because it is too large
Load Diff
10742
stages/2/elm.js
10742
stages/2/elm.js
File diff suppressed because it is too large
Load Diff
10762
stages/3/elm.js
10762
stages/3/elm.js
File diff suppressed because it is too large
Load Diff
11088
stages/4/elm.js
11088
stages/4/elm.js
File diff suppressed because it is too large
Load Diff
11088
stages/5/elm.js
11088
stages/5/elm.js
File diff suppressed because it is too large
Load Diff
@@ -16,10 +16,10 @@
|
||||
</body>
|
||||
|
||||
<script type="text/javascript">
|
||||
var app = Elm.fullscreen(Elm.ElmHub, {});
|
||||
var app = Elm.fullscreen(Elm.Main, {});
|
||||
|
||||
// Uncomment this line and comment out the above to enable elm-reactor support.
|
||||
// var app = Elm.fullscreenDebug("ElmHub", "ElmHub.elm");
|
||||
// var app = Elm.fullscreenDebug("ElmHub", "Main.elm");
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
"version": "1.0.0",
|
||||
"description": "Like GitHub, but for Elm stuff.",
|
||||
"scripts": {
|
||||
"build": "elm-make src/ElmHub.elm --output elm.js",
|
||||
"watch": "../../node_modules/.bin/elm-live src/ElmHub.elm --open -- --output=elm.js",
|
||||
"build": "elm-make src/Main.elm --output elm.js",
|
||||
"watch": "../../node_modules/.bin/elm-live src/Main.elm --open -- --output=elm.js",
|
||||
"test": "../../node_modules/.bin/elm-test test/TestRunner.elm",
|
||||
"install": "npm run build"
|
||||
},
|
||||
|
||||
@@ -12,26 +12,6 @@ import Json.Encode
|
||||
import Signal exposing (Address)
|
||||
|
||||
|
||||
main : Signal Html
|
||||
main =
|
||||
app.html
|
||||
|
||||
|
||||
app : StartApp.App Model
|
||||
app =
|
||||
StartApp.start
|
||||
{ view = view
|
||||
, update = update
|
||||
, init = ( initialModel, Effects.task (searchFeed initialModel.query) )
|
||||
, inputs = []
|
||||
}
|
||||
|
||||
|
||||
port tasks : Signal (Task Effects.Never ())
|
||||
port tasks =
|
||||
app.tasks
|
||||
|
||||
|
||||
searchFeed : String -> Task x Action
|
||||
searchFeed query =
|
||||
let
|
||||
|
||||
27
stages/5/src/Main.elm
Normal file
27
stages/5/src/Main.elm
Normal file
@@ -0,0 +1,27 @@
|
||||
module Main (..) where
|
||||
|
||||
import StartApp
|
||||
import ElmHub exposing (..)
|
||||
import Effects exposing (Effects)
|
||||
import Task exposing (Task)
|
||||
import Html exposing (Html)
|
||||
|
||||
|
||||
main : Signal Html
|
||||
main =
|
||||
app.html
|
||||
|
||||
|
||||
app : StartApp.App Model
|
||||
app =
|
||||
StartApp.start
|
||||
{ view = view
|
||||
, update = update
|
||||
, init = ( initialModel, Effects.task (searchFeed initialModel.query) )
|
||||
, inputs = []
|
||||
}
|
||||
|
||||
|
||||
port tasks : Signal (Task Effects.Never ())
|
||||
port tasks =
|
||||
app.tasks
|
||||
Reference in New Issue
Block a user