heroku-buildpack-php icon indicating copy to clipboard operation
heroku-buildpack-php copied to clipboard

Grunt support

Open ryan0x44 opened this issue 10 years ago • 5 comments

Hi,

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

Cheers

ryan0x44 avatar May 17 '14 06:05 ryan0x44

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.

ryan0x44 avatar May 17 '14 07:05 ryan0x44

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

jrschumacher avatar Jun 09 '14 08:06 jrschumacher

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

ryan0x44 avatar Jun 10 '14 10:06 ryan0x44

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

jrschumacher avatar Jun 10 '14 11:06 jrschumacher

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

jrschumacher avatar Jun 10 '14 12:06 jrschumacher