This is a Heroku buildpack for your grunt based web application located in
client directory of your project. It installs npm and bower dependencies, runs grunt and supports compass.
The buildpack runs if it finds a
client directory containing a gruntfile (
Your gruntfile must provide a
build task and build the client into a
Your server buildpack can then collect and serve the assets from
client/dist. Everything except
client/dist will be removed after build to reduce
the slug size.
You can configure your
client directory and
dist subdirectory with a
$ cat .client CLIENT_DIR=myclient DIST_DIR=mydist
This is not a standalone buildpack. It builds the client part of your web application and should be used together with other buildpacks like heroku-buildpack-ruby or heroku-buildpack-python. Use heroku-buildpack-multi to run multiple buildpacks:
$ heroku config:add BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-multi.git
From here you will need to create a
.buildpacks file which contains the buildpacks you wish to run when you deploy:
$ cat .buildpacks https://github.com/djng/heroku-buildpack-webapp-client.git <YOUR BUILDPACK> [i.e. https://github.com/heroku/heroku-buildpack-ruby.git, https://github.com/heroku/heroku-buildpack-python.git, ...]
Here's an overview of what this buildpack does:
client/bower.jsonis available and runs
For more technical details, see the heavily-commented compile script.
Anvil is a generic build server for Heroku.
gem install anvil-cli
The heroku-anvil CLI plugin is a wrapper for anvil.
heroku plugins:install https://github.com/ddollar/heroku-anvil
The ddollar/test buildpack runs
bin/test on your app/buildpack.
heroku build -b ddollar/test # -b can also point to a local directory
For more info on testing, see Best Practices for Testing Buildpacks on the Heroku discussion forum.
If you'd like to contribute, simply fork the repository, commit your changes to the master branch (or branch off of it), and send a pull request.
Copy the snippet above into CLI.