dokku-bower-grunt-build-plugin
dokku-bower-grunt-build-plugin copied to clipboard
only run bower and grunt for certain app
Is there a way to specify which app to apply this plugin to?
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"
},
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