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
.gitignore vendored
View File

@@ -1,2 +1,3 @@
elm-stuff elm-stuff
node_modules node_modules
elm.js

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -16,10 +16,10 @@
</body> </body>
<script type="text/javascript"> <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. // 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> </script>
</html> </html>

View File

@@ -3,8 +3,8 @@
"version": "1.0.0", "version": "1.0.0",
"description": "Like GitHub, but for Elm stuff.", "description": "Like GitHub, but for Elm stuff.",
"scripts": { "scripts": {
"build": "elm-make src/ElmHub.elm --output elm.js", "build": "elm-make src/Main.elm --output elm.js",
"watch": "../../node_modules/.bin/elm-live src/ElmHub.elm --open -- --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", "test": "../../node_modules/.bin/elm-test test/TestRunner.elm",
"install": "npm run build" "install": "npm run build"
}, },

View File

@@ -12,26 +12,6 @@ import Json.Encode
import Signal exposing (Address) 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 : String -> Task x Action
searchFeed query = searchFeed query =
let let

27
stages/5/src/Main.elm Normal file
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