Skip to content

Commit

Permalink
Automatically compile examples on Travis.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrempel committed Jun 10, 2017
1 parent a350990 commit 19b120a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
language: node_js

node_js: 5

env:
- PATH=$TRAVIS_BUILD_DIR/node_modules/.bin:$TRAVIS_BUILD_DIR/sysconfcpus/bin:$PATH

cache:
directories:
- sysconfcpus

before_install:
- |
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
install:
- npm install

script:
- sysconfcpus -n 2 npm test
1 change: 1 addition & 0 deletions examples/elm-architecture-tutorial/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
6 changes: 6 additions & 0 deletions examples/elm-architecture-tutorial/compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /bin/sh

mkdir -p build
elm-make --yes MainWithFullUrl.elm --output build/MainWithFullUrl.html
elm-make --yes MainWithJustHash.elm --output build/MainWithJustHash.html
elm-make --yes MainWithOldAPI.elm --output build/MainWithOldAPI.html
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "elm-route-url",
"version": "3.0.1",
"description": "Router for single-page-apps in Elm",
"main": "index.js",
"directories": {
"test": "tests"
},
"dependencies": {},
"devDependencies": {
"elm": "^0.18.0"
},
"scripts": {
"test": "cd examples/elm-architecture-tutorial && sh compile.sh"
},
"repository": {
"type": "git",
"url": "git+https://github.com/rgrempel/elm-route-url.git"
},
"author": "Ryan Rempel <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/rgrempel/elm-route-url/issues"
},
"homepage": "https://github.com/rgrempel/elm-route-url#readme"
}

0 comments on commit 19b120a

Please sign in to comment.