heroku-buildpack-nodejs-ember

by andrewbranch

GitHub Readme.md

Heroku Buildpack for Node.js + Ember CLI

This is a fork of the official Heroku buildpack for Node.js apps. It does everything the official one does, along with building an Ember CLI app in a subdirectory that you specify via a configuration variable.

How to Use

  • Have your Ember app in a subdirectory. I like /frontend.
  • Configure your Node.js app to serve the /frontend/dist folder that ember build makes.
  • Make sure Bower is listed in devDependencies in /frontend/package.json
  • .gitignore your /frontend/dist folder.
  • Tell the buildpack where your Ember app is: heroku config:set EMBER_DIR=frontend
  • Adopt the buildpack:

    heroku buildpack:set https://github.com/andrewbranch/heroku-buildpack-nodejs-ember.git -a myapp

What it Does

The official Node.js buildpack looks at package.json in your app’s root and installs all the dependencies listed. Afterwards, it caches the resulting node_modules folder to expedite future builds. This buildpack does the same thing, but also enters into EMBER_DIR, reads that package.json, installs the dependencies (including devDependencies), and then runs the following:

bower install
ember build --environment=production

(The binaries for bower and ember are taken from node_modules/.bin/.) Afterwards, it likewise caches the node_modules as well as the bower_components involved in building the Ember app.

Contributing

Issue submissions and pull requests are welcome, in that sequence, please.