Chain buildpacks (e.g. execute grunt command after node-js buildpack)

201 views
Skip to first unread message

Matthias Buchetics

unread,
Jul 21, 2012, 6:15:08 AM7/21/12
to buildpack-...@googlegroups.com
Hi,
I currently run a grunt task to generate the production files (minifying css files etc.) for my nodejs app. I run this locally, then commit all the files and push the changes to Heroku. After reading the blog post about the flexibility of buildpacks (http://blog.heroku.com/archives/2012/7/17/buildpacks/) it sounds like this is a perfect task for a custom buildpack and I won't need to do this manually anymore. Right?

I also found the new buildpacks plugin and build kits (https://buildkits.herokuapp.com/). If I understand build kits correctly, one can run multiple buildpacks in a sequence (every buildpack that matches using bin/detect). Ok, now my question regarding the task mentioned above: do I need to create a full nodejs buildpack with grunt support or is it possible to write a very small grunt extension which is run AFTER the nodejs buildpack?

And another question regarding build kits: it looks like build kits are attached to my Heroku account instead of die individual apps. That means I can't have different buildkits for different apps (use my grunt buildpack in one but not in the other), correct?

Thanks!

David Dollar

unread,
Jul 21, 2012, 8:54:19 AM7/21/12
to buildpack-...@googlegroups.com
Buildkits are still a very experimental concept so I would avoid using them for now.

For this problem I would fork the nodejs buildpack[1] and add your custom steps to bin/compile.

You can have your app use your custom buildpack by setting a BUILDPACK_URL config var pointing at the forked repo.

--
You received this message because you are subscribed to the Google Groups "buildpack-developers" group.
To unsubscribe from this group, send email to buildpack-develo...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages