Broccoli is a performant and well maintained build tool that has been blessed by the Ember community. Grunt is the task manager that we all know and love (you know you still do). They fill their respective niches well, and using them together makes a lot of sense.
This Grunt plugin lets you specify different Broccoli tasks in the same Gruntfile, and then use either the
serve command with each of them.
Upgrading from 0.4.2
The latest version of grunt-broccoli upgrades the Broccoli dependency to ^1.0.0. All previously existing options still remain, but to align better with Grunt convention, they are now specified in the
options object of your task. This also enables you to specify global options for all Broccoli tasks that can then be overriden for individual tasks.
For more details, see the changelog.
Install it by running
npm i -D grunt-broccoli.
We've included a sample Gruntfile configuration below. You can use any name for your targets and then, in the terminal, pass either
serve as the final command. For instance:
grunt broccoli:prod:build# orgrunt broccoli:dev:watch# orgrunt broccoli:inline-config:serve
For a more exhaustive example of what a
Brocfile.js might look like, see broccoli-sample-app.