chronick / middleman-bower-template

A middleman template that uses bower for asset management, and a few other defaults I found useful.
Other
39 stars 22 forks source link

Deploying to Heroku #4

Closed hanno-jonlay closed 10 years ago

hanno-jonlay commented 10 years ago

Hey there - just interested to know if you've been deploying to Heroku recently?

I saw the package.json was quite out of date for the npm bower dependency, and I've been having other issues getting similar projects of my own to work with this sortof MM+Bower+Heroku setup (https://github.com/wearehanno/heroku-foundation).

If you had any pointers, even to say 'nope, I've not tried to get this on Heroku in a while' those might come in handy!

samselikoff commented 10 years ago

+1, @jonlay did you get it working? I'm getting an error with normalize.scss

hanno-jonlay commented 10 years ago

I didn't, unfortunately, but I did do a pull request a minute ago to get things a little bit more up to date: https://github.com/headcanon/middleman-bower-template/pull/5

You should be able to get past that normalize issue on middleman build by running bower install to set up the dependencies. That won't help you on Heroku, though (I believe it needs a package.json file to trigger that if you're trying to get it onto Heroku).

chronick commented 10 years ago

I havent done this in a while, but I do remember having to remove the components directory from the gitignore since heroku won't be able to run bower install. I believe the solution here would be to have some ultimate Ruby + Node buildpack that can run gem, npm, and bower to get everything installed and running.

Another alternative would be to build the site locally and push a subdirectory to a heroku instance with a php+nginx buildpack (like this one, but its also a bit out of date: https://github.com/headcanon/heroku-buildpack-php-nginx), but I haven't done that before, nor am I entirely certain how to do that.

But ultimately Heroku doesn't support node or bower on the default ruby buildpack, so you'll have to send up any bower-installed assets with the git push. Its definitely not ideal, so if you happen across a better solution, please let me know!

chronick commented 10 years ago

closing. Feel free to open if there are still questions here.