CHH / heroku-buildpack-php

A more advanced PHP buildpack for Heroku, inspired by the Node.js buildpack
MIT License
265 stars 156 forks source link

Grunt support #136

Open ryan0x44 opened 10 years ago

ryan0x44 commented 10 years ago

Hi,

Just wondering if there is a way to support executing Grunt after deployment?

Cheers

ryan0x44 commented 10 years ago

Just found the compile option!

For anyone looking to use Grunt like me, here's a snippet from my composer.json file:

    "heroku": {
        "compile": [
            "node_modules/grunt-cli/bin/grunt""
        ]
    }

Note I have used a local instance of grunt-cli so it can be installed via my package.json file.

jrschumacher commented 10 years ago

@ryandjurovich how did you install grunt without specifying the node environment? I had to patch it here, but I am curious

ryan0x44 commented 10 years ago

@jrschumacher I didn't have to specify this - are your dependencies under dependencies or devDependencies in your package.json?

jrschumacher commented 10 years ago

Ah, good catch. I wasn't thinking about that. Yes they are under dev.

jrschumacher commented 10 years ago

Also, you can do node_modules/.bin/grunt instead of the full path.