This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"start:dev": "babel-node build_scripts/devServer.js", | |
"start": "npm-run-all --parallel start:dev", | |
"build": "babel-node build_scripts/build.js", | |
"postbuild": "babel-node build_scripts/prodServer.js" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>DG Elm Starter Kit</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
</head> | |
<body> | |
<div id="app"></div> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>DG Elm Starter Kit</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link href="./main.css" rel="stylesheet"></head> | |
<body> | |
<div id="app"></div> | |
<script type="text/javascript" src="./main.js"></script></body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Elm from './app/Main.elm'; | |
import './main.scss'; | |
const mountNode = document.getElementById('app'); | |
const app = Elm.Main.embed(mountNode); | |
if (module.hot) { | |
module.hot.accept(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
-- src/ | |
-- app/ | |
| -- Components.elm # Contains view components | |
| -- Main.elm # Main entry file | |
| -- Models.elm # Contains domain model | |
| -- Pages.elm # Contains all the pages | |
-- index.html | |
-- main.js | |
-- main.scss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Models exposing (..) | |
import Lorem | |
type alias Post = | |
{ id: String | |
, title : String | |
, body : String | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Components exposing (..) | |
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Models exposing (Post) | |
layout : Html msg -> Html msg -> Html msg | |
layout header main = | |
div [] | |
[ header, main ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Pages exposing (..) | |
import Html exposing (Html) | |
import Components exposing (..) | |
import Models exposing (..) | |
landing : Model -> Html msg | |
landing model = | |
layout authHeader <| landingBody model.posts | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main exposing (main) | |
import Html exposing (program) | |
import Models exposing (..) | |
import Pages | |
main : Program Never Model msg | |
main = program | |
{ init = (initialModel, Cmd.none ) | |
, view = Pages.landing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Do not remove this | |
$roboto-font-path: "~materialize-css/dist/fonts/roboto/"; | |
@import "../node_modules/materialize-css/sass/materialize"; | |
.card { | |
cursor: pointer; | |
} | |