-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,434 additions
and
99 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,43 @@ | ||
'use strict'; | ||
|
||
var gulp = require('gulp'), | ||
http = require('http'), | ||
st = require('st'), | ||
exec = require('child_process').exec, | ||
gutil = require('gulp-util'), | ||
clear = require('clear'), | ||
counter = 0; | ||
|
||
var cmd = 'elm make ./Main.elm --output ./bundle.js'; | ||
clear(); | ||
gulp.task('default', ['server', 'watch', 'elm']); | ||
|
||
gulp.task('watch', function(cb) { | ||
gulp.watch('**/*.elm', ['elm']); | ||
}); | ||
|
||
gulp.task('server', function(done) { | ||
gutil.log(gutil.colors.blue('Starting server at http://localhost:4000')); | ||
http.createServer( | ||
st({ | ||
path: __dirname, | ||
index: 'index.html', | ||
cache: false | ||
}) | ||
).listen(4000, done); | ||
}); | ||
|
||
gulp.task('elm', function(cb) { | ||
if (counter > 0){ | ||
clear(); | ||
} | ||
exec(cmd, function(err, stdout, stderr) { | ||
if (err){ | ||
gutil.log(gutil.colors.red('elm make: '),gutil.colors.red(stderr)); | ||
} else { | ||
gutil.log(gutil.colors.green('elm make: '), gutil.colors.green(stdout)); | ||
} | ||
cb(); | ||
}); | ||
counter++; | ||
}); |
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,19 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Basketball Score Keeper</title> | ||
<link rel="stylesheet" href="app.css"> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
<script src="bundle.js"></script> | ||
<script> | ||
var app = Elm.Main.embed(document.getElementById("app")); | ||
</script> | ||
</body> | ||
|
||
</html> |
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,17 @@ | ||
{ | ||
"name": "beginner", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "bundle.js", | ||
"devDependencies": { | ||
"clear": "0.0.1", | ||
"gulp": "^3.9.1", | ||
"gulp-util": "^3.0.7", | ||
"st": "^1.1.0" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"license": "ISC" | ||
} |
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,19 @@ | ||
# Development Environment Setup Steps | ||
|
||
1. Install Recent Version of **Nodejs** by downloading and running the installer found at https://nodejs.org/en/ | ||
2. Install **Elm** by keying the command `npm install -g elm` | ||
3. Install the atom editor located at https://atom.io/ | ||
4. Install the **language-elm** using the atom package manager (apm), by keying the command `apm install language-elm` | ||
5. Install **elm-oracle** by keying `npm install -g elm-oracle` | ||
6. Determine the path where the `elm-oracle` command was installed by keying `which elm-oracle` on mac and unix or `where.exe elm-oracle` on windows. Copy the entire path and file name to the clipboard, for use in the next step | ||
7. Open up Atom, then open up the preferences/settings by pressing `CMD + ,` or via the menu. Click `packages` then filter by `elm`. Find the language-elm package and click the `settings` button. Set the `elm-oracle` setting, by pasting the value we copied in the prior step. | ||
10. Download the current version of **elm-format** found at https://github.com/avh4/elm-format | ||
11. Unzip the downloaded file and move the `elm-format` executable to a location in your PATH variable, such as `mv ~/Downloads/elm-format /usr/local/bin/elm-format` | ||
12. Install the `elm-format` Atom Package *(Note: different from elm-format command)*, by keying `apm install elm-format` | ||
13. Start Atom, Open up Settings `CMD + ,`, click `Packages`, filter by `elm`, then click on the `elm-format` package's `settings` button. Set the `elm-format` command path setting and veryify the `format on save` checkbox is checked. | ||
14. Install atom linter by keying `apm install linter` | ||
15. Install the elm linger by keying `apm install linter-elm-make` | ||
16. Locate and copy the path and file for the `elm-make` command by keying the command `which elm-make` for mac or `where.exe elm-make` on windows. | ||
17. Open the `linter-elm-make` settings page in atom as you did in steps 7 and 13, then click the settings button next to `linter-elm-make` and then set the `elm-make` setting to the copied value from the prior step. | ||
|
||
Your atom / elm dev environment should be good to go! |
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.