-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from elmbridge/move-from-release-system-tofiles
Move from release system to files
- Loading branch information
Showing
15 changed files
with
1,039 additions
and
84 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
/dist/ | ||
/elm-stuff/ | ||
/index.html | ||
.DS_Store | ||
/node_modules/ | ||
/package-lock.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
sudo: false | ||
|
||
language: node_js | ||
node_js: "10" | ||
|
||
install: | ||
- npm install [email protected] | ||
|
||
script: | ||
- npx elm-make --yes HelloWorld.elm | ||
- npx elm-make --yes Part1.elm | ||
- npx elm-make --yes Part2.elm | ||
- npx elm-make --yes Part3.elm | ||
- npx elm-make --yes Part4.elm | ||
- npx elm-make --yes Part5.elm | ||
- npx elm-make --yes Part6.elm | ||
- npx elm-make --yes Part7.elm | ||
- npx elm-make --yes Part8.elm |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
module HelloWorld exposing (..) | ||
|
||
import Html | ||
import Html.Attributes | ||
import Html.Events | ||
|
||
|
||
-- MAIN | ||
|
||
|
||
main : Program Never Model Msg | ||
main = | ||
Html.beginnerProgram | ||
{ model = init | ||
, view = view | ||
, update = update | ||
} | ||
|
||
|
||
|
||
-- MODEL | ||
|
||
|
||
type alias Model = | ||
{ buttonLabel : String } | ||
|
||
|
||
init : Model | ||
init = | ||
{ buttonLabel = "hello world!" } | ||
|
||
|
||
|
||
-- UPDATE | ||
|
||
|
||
type Msg | ||
= ChangeText | ||
|
||
|
||
update : Msg -> Model -> Model | ||
update msg model = | ||
case msg of | ||
ChangeText -> | ||
if model.buttonLabel == "hello world!" then | ||
{ model | buttonLabel = "goodbye world!" } | ||
else | ||
{ model | buttonLabel = "hello world!" } | ||
|
||
|
||
|
||
-- VIEW | ||
|
||
|
||
view : Model -> Html.Html Msg | ||
view model = | ||
Html.div | ||
[ Html.Attributes.class "skeleton-elm-project" ] | ||
[ Html.node "link" | ||
[ Html.Attributes.rel "stylesheet" | ||
, Html.Attributes.href "stylesheets/main.css" | ||
] | ||
[] | ||
, Html.div | ||
[ Html.Attributes.class "waves-effect waves-light btn-large" | ||
, Html.Events.onClick ChangeText | ||
] | ||
[ Html.text model.buttonLabel ] | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
module Part1 exposing (..) | ||
|
||
import Html | ||
import Html.Attributes | ||
import Html.Events | ||
|
||
|
||
-- MAIN | ||
|
||
|
||
main : Program Never Model Msg | ||
main = | ||
Html.beginnerProgram | ||
{ model = init | ||
, view = view | ||
, update = update | ||
} | ||
|
||
|
||
|
||
-- MODEL | ||
|
||
|
||
type alias Model = | ||
{ currentText : String } | ||
|
||
|
||
init : Model | ||
init = | ||
{ currentText = "" } | ||
|
||
|
||
|
||
-- UPDATE | ||
|
||
|
||
type Msg | ||
= SetCurrentText String | ||
|
||
|
||
update : Msg -> Model -> Model | ||
update msg model = | ||
case msg of | ||
SetCurrentText newText -> | ||
-- currently, this does nothing! | ||
model | ||
|
||
|
||
|
||
-- VIEW | ||
|
||
|
||
view : Model -> Html.Html Msg | ||
view model = | ||
Html.div | ||
[] | ||
[ Html.node "link" | ||
[ Html.Attributes.rel "stylesheet" | ||
, Html.Attributes.href "stylesheets/main.css" | ||
] | ||
[] | ||
, Html.nav | ||
[] | ||
[ Html.div | ||
[ Html.Attributes.class "nav-wrapper light-blue lighten-2" ] | ||
[ Html.div | ||
[ Html.Attributes.class "brand-logo center" ] | ||
[ Html.text "Elmoji Translator" ] | ||
] | ||
] | ||
, Html.section | ||
[ Html.Attributes.class "container" ] | ||
[ Html.div | ||
[ Html.Attributes.class "input-field" ] | ||
[ Html.input | ||
[ Html.Attributes.type_ "text" | ||
, Html.Attributes.class "center" | ||
, Html.Attributes.placeholder "Let's Translate!" | ||
, Html.Events.onInput SetCurrentText | ||
] | ||
[] | ||
] | ||
] | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
module Part2 exposing (..) | ||
|
||
import Html | ||
import Html.Attributes | ||
import Html.Events | ||
|
||
|
||
-- MAIN | ||
|
||
|
||
main : Program Never Model Msg | ||
main = | ||
Html.beginnerProgram | ||
{ model = init | ||
, view = view | ||
, update = update | ||
} | ||
|
||
|
||
|
||
-- MODEL | ||
|
||
|
||
type alias Model = | ||
{ currentText : String } | ||
|
||
|
||
init : Model | ||
init = | ||
{ currentText = "" } | ||
|
||
|
||
|
||
-- UPDATE | ||
|
||
|
||
type Msg | ||
= SetCurrentText String | ||
|
||
|
||
update : Msg -> Model -> Model | ||
update msg model = | ||
case msg of | ||
SetCurrentText newText -> | ||
{ model | currentText = newText } | ||
|
||
|
||
|
||
-- VIEW | ||
|
||
|
||
view : Model -> Html.Html Msg | ||
view model = | ||
Html.div | ||
[] | ||
[ Html.node "link" | ||
[ Html.Attributes.rel "stylesheet" | ||
, Html.Attributes.href "stylesheets/main.css" | ||
] | ||
[] | ||
, Html.nav | ||
[] | ||
[ Html.div | ||
[ Html.Attributes.class "nav-wrapper light-blue lighten-2" ] | ||
[ Html.div | ||
[ Html.Attributes.class "brand-logo center" ] | ||
[ Html.text "Elmoji Translator" ] | ||
] | ||
] | ||
, Html.section | ||
[ Html.Attributes.class "container" ] | ||
[ Html.div | ||
[ Html.Attributes.class "input-field" ] | ||
[ Html.input | ||
[ Html.Attributes.type_ "text" | ||
, Html.Attributes.class "center" | ||
, Html.Attributes.placeholder "Let's Translate!" | ||
, Html.Events.onInput SetCurrentText | ||
] | ||
[] | ||
] | ||
, Html.p | ||
[ Html.Attributes.class "center output-text emoji-size" ] | ||
[ Html.text model.currentText ] | ||
] | ||
] |
Oops, something went wrong.