Giter Club home page Giter Club logo

heroku-buildpack-elm's Introduction

Heroku buildpack for Elm apps

Check out the example app elm-todomvc. In brief:

  • Add an app.json file
    • Ensure that a second buildpack provides the web server (elm-todomvc uses the static buildpack)
  • Specify the value of ELM_COMPILE (command used to compile your Elm sources) in app.json
  • Add the elm buildpack: heroku buildpacks:add https://github.com/srid/heroku-buildpack-elm
    • Add static buildpack if needed: heroku buildpacks:add https://github.com/hone/heroku-buildpack-static
  • Deploy!
    • e.g. git commit -am "empty" && git push heroku master && heroku ps:scale web=1

Customizing

Elm Version

The buildpack aims to use the latest version of Elm by default. To specify an alternative Elm version, create this file in your repo:

$ cat .buildpack.env
export ELM_VERSION=0.15
^D

Build Cache

By default, this buildpack will save and reuse intermediate build objects between deploys. If you want to perform a clean build on every deploy, you may specify that in your .buildpack.env file:

$ cat .buildpack.env
export CACHE_BUILD_OBJECTS=false
^D

HACKING

Generating and uploading binaries

Binaries are generated using docker, and uploaded to s3.

# To generate docker image containing the binaries
make binaries

# To upload to s3
aws configure  # creates ~/.aws/...
make upload

Upgrading to newer Elm version

  • Modify the ELM_VERSION env var in Dockerfile
  • make binaries upload
  • Modify the ELM_VERSION env var in bin/compile
  • Update CHANGELOG.md
  • git push

Questions?

Feel free to ask in Github Issues.

heroku-buildpack-elm's People

Contributors

aaronshim avatar anicholson avatar brianstorti avatar freerobby avatar powermosfet avatar raineorshine avatar srid avatar wohlgejm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.