Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Upgrade to 0.17 #149

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
bower_components
elm-stuff
node_modules
serve
dist
.publish
.idea
# Compiled tests
elm.js
test.html
20 changes: 18 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,27 @@ language: node_js
node_js:
- "4.1"


cache:
directories:
- sysconfcpus

install:
- npm install -g elm@0.16.0 casperjs http-server
- npm install -g elm@~0.17.0 casperjs http-server
- elm-package install -y
# Getting elm-make to run quicker.
# See https://github.com/elm-lang/elm-compiler/issues/1473#issuecomment-245704142
- |
if [ ! -d sysconfcpus/bin ];
then
git clone https://github.com/obmarg/libsysconfcpus.git;
cd libsysconfcpus;
./configure --prefix=$TRAVIS_BUILD_DIR/sysconfcpus;
make && make install;
cd ..;
fi
before_script:
- elm-make ./src/elm/TestRunner.elm --output test.html
- $TRAVIS_BUILD_DIR/sysconfcpus/bin/sysconfcpus -n 2 elm-make ./src/elm/TestRunner.elm --output test.html
- http-server '.' &
# Wait for compilation is done.
- until $(curl --output /dev/null --silent --head --fail http://127.0.0.1:8080/test.html); do echo "." && sleep 1; done
Expand Down
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ An Elm single page application. The server side code is [here](https://github.co

[Read more](http://www.gizra.com/content/elm-hedley-overview/) about this project.

## Install
## Installation

Install Elm v0.16.0 (`npm install -g [email protected]`)
Make sure the following are installed:

```
npm install && bower install
elm-package install -y
```
* NodeJs (and npm)
* Elm (e.g. `npm install -g [email protected]`)
* Compass (for SASS) (`gem update --system && gem install compass`)

Execute with `gulp`
## Usage

## Testing
1. Serve locally, and watch file changes: `gulp`

In order to view the tests on the browser Start elm reactor (`elm-reactor`) and navigate to [http://localhost:8000/src/elm/TestRunner.elm](http://localhost:8000/src/elm/TestRunner.elm)
## Unit Tests

In order to view the tests on the browser Start elm reactor (elm-reactor) and navigate to http://0.0.0.0:8000/src/elm/TestRunner.elm

## License

BSD3
20 changes: 0 additions & 20 deletions bower.json

This file was deleted.

27 changes: 11 additions & 16 deletions elm-package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
{
"version": "1.0.0",
"summary": "helpful summary of your project, less than 80 characters",
"repository": "https://github.com/gizra/elm-hedley.git",
"repository": "https://github.com/Gizra/elm-hedley.git",
"license": "BSD3",
"source-directories": [
"src/elm",
"src/vendor/elm-param-parsing/src",
"src/vendor/elm-storage/src",
"src/vendor/elm-web-api/src"
"src/elm"
],
"exposed-modules": [],
"native-modules": true,
"dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0",
"elm-lang/core": "3.0.0 <= v < 4.0.0",
"evancz/elm-effects": "2.0.1 <= v < 3.0.0",
"evancz/elm-html": "4.0.2 <= v < 5.0.0",
"evancz/elm-http": "3.0.0 <= v < 4.0.0",
"evancz/start-app": "2.0.2 <= v < 3.0.0",
"evancz/task-tutorial": "1.0.3 <= v < 2.0.0",
"rgrempel/elm-route-hash": "1.0.5 <= v < 2.0.0",
"truqu/elm-base64": "1.0.3 <= v < 2.0.0"
"elm-community/elm-test": "3.1.0 <= v < 4.0.0",
"elm-community/json-extra": "2.0.0 <= v < 3.0.0",
"elm-lang/core": "5.0.0 <= v < 6.0.0",
"elm-lang/html": "2.0.0 <= v < 3.0.0",
"elm-lang/navigation": "2.0.1 <= v < 3.0.0",
"elm-lang/elm-http": "1.0.0 <= v < 2.0.0",
"krisajenkins/remotedata": "4.0.1 <= v < 5.0.0",
"rgrempel/elm-route-url": "2.0.1 <= v < 3.0.0"
},
"elm-version": "0.16.0 <= v < 0.17.0"
"elm-version": "0.18.0 <= v < 0.19.0"
}
17 changes: 2 additions & 15 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ var elm = require('gulp-elm');

var fs = require('fs');

var ga = require('gulp-ga');

// merge is used to merge the output from two different streams into the same stream
var merge = require("merge-stream");
// Need a command for reloading webpages using BrowserSync
Expand Down Expand Up @@ -126,17 +124,6 @@ gulp.task('bower', function () {
.pipe(gulp.dest("serve"));
});

gulp.task('ga', function(){
gulp.src('src/index.html')
.pipe(ga({
anonymizeIp: false,
sendPageView: true,
url: 'auto',
uid: 'UA-6558346-13'
}))
.pipe(gulp.dest('serve'));
});


// Optimizes all the CSS, HTML and concats the JS etc
gulp.task("minify", ["styles"], function () {
Expand Down Expand Up @@ -172,7 +159,7 @@ gulp.task("minify", ["styles"], function () {
gulp.task("deploy", [], function () {
// Deploys your optimized site, you can change the settings in the html task if you want to
return gulp.src("dist/**/*")
.pipe($.ghPages({branch: "gh-pages", cacheDir: ".publish"}));
.pipe($.ghPages({branch: "gh-pages"}));
});

gulp.task('elm-init', elm.init);
Expand Down Expand Up @@ -231,7 +218,7 @@ gulp.task("default", ["serve:dev", "watch"]);

// Builds the site but doesnt serve it to you
// @todo: Add "bower" here
gulp.task("build", gulpSequence("clean:dev", ["styles", "copy:dev", "elm"], "ga"));
gulp.task("build", gulpSequence("clean:dev", ["styles", "copy:dev", "elm"]));

// Builds your site with the "build" command and then runs all the optimizations on
// it and outputs it to "./dist"
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
"devDependencies": {
"browser-sync": "1.9.2",
"del": "1.2.1",
"gulp": "~3.9.0",
"gulp": "3.9.1",
"gulp-autoprefixer": "2.3.1",
"gulp-cache": "0.2.10",
"gulp-cached": "1.0.1",
"gulp-changed": "1.0.0",
"gulp-elm": "0.2.0",
"gulp-elm": "0.4.1",
"gulp-filter": "2.0.2",
"gulp-ga": "0.0.7",
"gulp-gh-pages": "0.4.0",
"gulp-gzip": "0.0.8",
"gulp-htmlmin": "0.2.0",
Expand Down
4 changes: 2 additions & 2 deletions runTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ casper.test.begin('Run the Elm tests', function suite(test) {
casper.start(url).then(function() {
// The test runner doesn't provide a class, so we have to do this query
// selector.
casper.waitForSelector('body > div > div > div', function() {
test.assertSelectorHasText('body > div > div > div', 'All tests passed');
casper.waitForSelector('pre', function() {
test.assertSelectorHasText('pre', 'All tests passed');
});

});
Expand Down
Binary file removed src/assets/images/[email protected]
Binary file not shown.
Binary file removed src/assets/images/[email protected]
Binary file not shown.
84 changes: 0 additions & 84 deletions src/assets/scss/_article-page.scss

This file was deleted.

90 changes: 0 additions & 90 deletions src/assets/scss/_events-page.scss

This file was deleted.

Loading