Remove elm.js and split out Main.elm

This commit is contained in:
Richard Feldman
2016-03-06 00:28:00 -08:00
parent 70e78a4028
commit fe473e1041
10 changed files with 32 additions and 54432 deletions
+1
View File
@@ -1,2 +1,3 @@
elm-stuff
node_modules
elm.js
-10728
View File
File diff suppressed because it is too large Load Diff
-10742
View File
File diff suppressed because it is too large Load Diff
-10762
View File
File diff suppressed because it is too large Load Diff
-11088
View File
File diff suppressed because it is too large Load Diff
-11088
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -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>
+2 -2
View File
@@ -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"
},
-20
View File
@@ -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
View 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