Registry / devops / grunt-broccoli-build

grunt-broccoli-build

JSON →
library0.6.0jsnpmunverified

Grunt plugin to run a Broccoli build as a Grunt task. This plugin invokes Broccoli's build within a Grunt workflow, allowing developers to use Grunt for orchestration (cleaning, testing, etc.) while leveraging Broccoli for asset pipeline builds. Version 0.6.0 is the final release; it requires Grunt >=0.4.1 <0.5.0 and Broccoli >=0.2.1. It is designed for simple integration: load the npm task and configure a broccoli_build target with a destination and optional Brocfile path. The plugin supports configurable brocfile (since 0.5.0) and waits for Broccoli's cleanup promise (fixed in 0.6.0). No longer actively developed; consider switching to direct Broccoli CLI or modern alternatives.

npm install grunt-broccoli-build
INSTALL
IMPORT
SIG · GRUNT-BROCCOLI-BUI
G
grunt-broccoli-build
devopsjavascriptv0.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

grunt-broccoli-build
grunt.loadNpmTasks('grunt-broccoli-build');
require('grunt-broccoli-build');
Grunt plugins are not directly imported; they are loaded via grunt.loadNpmTasks. This is a Gruntime pattern, not a standard ES module.
broccoli_build task
grunt.initConfig({ broccoli_build: { assets: { dest: 'build/', brocfile: 'Brocfile.js' } } });
grunt.initConfig({ 'broccoli-build': { ... } });
The task name uses underscores, not hyphens. Config key must match the task name exactly.
Gruntfile loading
module.exports = function(grunt) { grunt.loadNpmTasks('grunt-broccoli-build'); grunt.initConfig({...}); };
import { loadNpmTasks } from 'grunt-broccoli-build';
Gruntfiles are CommonJS; there is no ES module import for Grunt plugins.

Configures and runs the broccoli_build Grunt task to build assets via Broccoli.

// Install: npm install grunt-broccoli-build --save-dev // In Gruntfile.js: module.exports = function(grunt) { grunt.loadNpmTasks('grunt-broccoli-build'); grunt.initConfig({ broccoli_build: { assets: { dest: 'build/', brocfile: 'Brocfile.js' } } }); grunt.registerTask('default', ['broccoli_build']); };
Debug
Known issues
gotchaRequires Grunt >=0.4.1 <0.5.0; does not work with Grunt 1.x or later.
fix
Use an older Grunt version or migrate to a modern build tool (e.g., direct Broccoli CLI, webpack, or Vite).
affects: all
breakingRemoved support for multiple build environments in version 0.2.0; users must now use grunt-env for BROCCOLI_ENV.
fix
Install and configure grunt-env to set BROCCOLI_ENV before running broccoli_build.
affects: >=0.2.0
deprecatedPackage is no longer maintained; last release in 2015.
fix
Consider alternatives like directly using broccoli CLI or moving to another asset pipeline.
affects: all
breakingVersion 0.0.4 fixed to work with Broccoli 0.4.x, but later versions may break with older Broccoli.
fix
Ensure Broccoli >=0.12.x for version 0.2.0+.
affects: >=0.1.0
gotchaThe task name 'broccoli_build' uses underscores; misconfiguration with hyphens will silently fail.
fix
Use 'broccoli_build' (underscores) in task name and initConfig key.
affects: all
Errors
Common errors & fixes
Warning: Task "broccoli_build" not found.
Plugin not loaded or installed; or requires newer Grunt version.
fix
Run 'npm install grunt-broccoli-build --save-dev' and ensure grunt.loadNpmTasks('grunt-broccoli-build') is in Gruntfile. Check Grunt version compatibility.
Error: Cannot find module 'broccoli'
Required peer dependency 'broccoli' not installed.
fix
Run 'npm install broccoli --save-dev'.
Fatal error: Unable to find Gruntfile.
Gruntfile.js is missing or not in the current directory.
fix
Create a Gruntfile.js with the necessary configuration.
Upgrade
Version history
0.6.0latest on npm
Audit
Dependencies
gruntrequiredPeer dependency: task runner required to load this plugin
broccolirequiredPeer dependency: asset pipeline library that performs the actual build
Agent activity
4 hits · last 30 days
node
4
Resources
grunt-broccoli-build — npm install grunt-broccoli-build · libregistry