Skip to content

Commit

Permalink
Review examples and the way they're built
Browse files Browse the repository at this point in the history
This to avoid having to carry unneeded dependencies in the library.
I use a symlink as a trick to make the module available to the examples
without having to require it explicitly as a dependency

This commit also makes 'deploy.sh' less verbose & fix example publication

- If the tag doesn't already exist, it displays an error message in the
console which we ought to ignore.

- Also, the publication to gh-pages was completely broken. It will now
nicely create a single commit with only the exported artefacts and get
back to master.

Finally, we are making examples a bit more sexy

- Review overall look-and-feel (colors, fonts, sizes, etc.)
- Remove the 'clientId' input and hard-code a demo clientId
- Display current 'Model' next to the actual content
  • Loading branch information
KtorZ committed Sep 6, 2018
1 parent 4b3ed84 commit 4801593
Show file tree
Hide file tree
Showing 5 changed files with 176 additions and 82 deletions.
21 changes: 13 additions & 8 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,24 @@ else
fi

## Create tag and publish
git tag -d $version
git tag -d $version 1>/dev/null 2>&1
git tag -a $version -m "release version $version" && git push origin $version
elm publish || exit 1


## Deploy examples
git checkout "gh-pages" || exit 1
for d in examples/*; do
if [ "$d" != "examples/images" ]; then
elm make "$d/Main.elm"
mv index.html $d
fi
git merge --squash -
git commit -m "tmp"
cd examples
for d in $(find . -type d ! -path '*elm-stuff*' ! -name '.') ; do
elm make --optimize --output $d/index.html "$d/Main.elm"
git add -f $d/index.html
done
git add . && git commit -m "release version $version"
git push origin HEAD && git checkout -
git commit -m "release version $version"
git rebase HEAD~ --onto HEAD~2
git push origin HEAD
git checkout -


echo "==========\nDONE."
27 changes: 27 additions & 0 deletions examples/elm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"type": "application",
"source-directories": [
"src"
],
"elm-version": "0.19.0",
"dependencies": {
"direct": {
"elm/browser": "1.0.0",
"elm/core": "1.0.0",
"elm/html": "1.0.0",
"elm/http": "1.0.0",
"elm/json": "1.0.0",
"elm/url": "1.0.0",
"truqu/elm-base64": "2.0.4"
},
"indirect": {
"elm/regex": "1.0.0",
"elm/time": "1.0.0",
"elm/virtual-dom": "1.0.0"
}
},
"test-dependencies": {
"direct": {},
"indirect": {}
}
}
Binary file removed examples/images/google.png
Binary file not shown.
Loading

0 comments on commit 4801593

Please sign in to comment.