dokku-bower-grunt-build-plugin icon indicating copy to clipboard operation
dokku-bower-grunt-build-plugin copied to clipboard

only run bower and grunt for certain app

Open tnguyen14 opened this issue 9 years ago • 2 comments

Is there a way to specify which app to apply this plugin to?

tnguyen14 avatar Sep 03 '14 03:09 tnguyen14

If you want to do it per app, you can replace this plugin with postinstall in your scripts of package.json. I include grunt-cli and bower in my dependencies so I don't have to install them otherwise. Since this is an app, not a component, it's valid since they are required for production.

  "scripts": {
    "start": "NODE_ENV=production node app.js",
    "build": "grunt build && node build",
    "postinstall": "bower install --allow-root --production --interactive=false && npm run build"
  },

kmiyashiro avatar Oct 12 '14 22:10 kmiyashiro

You can use my BUILDPACK (https://github.com/sibeliusseraphini/heroku-buildpack-nodejs-bower-grunt)

just put this: export BUILDPACK_URL=https://github.com/sibeliusseraphini/heroku-buildpack-nodejs-bower-grunt

inside a .env in your repo

This buildpack install the npm dependencies, and bower dependencies (they cache both to allow faster deployments), and in the end it call grunt build:$NODE_ENV

you can change NODE_ENV=prod or dev, if you have this two types of build

sibelius avatar Mar 20 '15 16:03 sibelius