0

I am deploying a Node.js application on Heroku. My production deployment is based on a Grunt task that minifies js and css files, placing them in a /dist folder from which they are called.

How can I add this step on the Heroku deployment?

Mike M
  • 4,879
  • 5
  • 38
  • 58

1 Answers1

0

Use a postinstall script, as outlined in Heroku's DevCenter docs for node:

eg:

"scripts": {
    "postinstall": "grunt uglify",
    "start": "node server.js"
  }
hunterloftis
  • 13,386
  • 5
  • 48
  • 50