Registry / devops / grunt-component-build

grunt-component-build

JSON →
library0.5.3jsnpmunverified

A Grunt plugin to build and watch component(1) packages. It wraps the component build.js library (builder2.js) to compile component projects within a Grunt workflow. Latest version is 0.5.3, supporting component 1.0.0+ and builder2.js plugins (e.g., CoffeeScript, Jade). It provides task configuration for development, standalone builds, CSS prefixing, and asset copying. The plugin is in maintenance mode; the component ecosystem has largely shifted to modern build tools.

npm install grunt-component-build
INSTALL
IMPORT
SIG · GRUNT-COMPONENT-BU
G
grunt-component-build
devopsjavascriptv0.5.3
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.

componentbuild
grunt.loadNpmTasks('grunt-component-build');
const componentBuild = require('grunt-component-build');
Plugin is loaded as a Grunt task, not imported directly in code.
default import
npm install grunt-component-build --save-dev
npm install --save grunt-component-build
Should be saved as devDependency since it's a build tool.
task registration
grunt.initConfig({ componentbuild: { ... } });
grunt.config.set('componentBuild', { ... });
Task name is all lowercase 'componentbuild' in configuration.

Shows how to install, load the plugin, and configure a basic build task.

// Install: npm install grunt-component-build --save-dev // Gruntfile.js module.exports = function(grunt) { grunt.loadNpmTasks('grunt-component-build'); grunt.initConfig({ componentbuild: { options: { name: 'myapp', development: true }, src: 'src/components', dest: 'public/build' } }); grunt.registerTask('default', ['componentbuild']); };
Debug
Known issues
breakingVersion 0.5.0 drops support for component-build <1.0.0; uses builder2.js API.
fix
Upgrade to 0.5.0+ and update component configuration to match builder2.js.
affects: <0.5.0
deprecatedGrunt 0.4.0+ required; older Grunt versions are unsupported.
fix
Use Grunt 0.4.0 or later.
affects: >=0.4.0
gotchaTask name is 'componentbuild' (all lowercase), not 'componentBuild'.
fix
Use 'componentbuild' in grunt.initConfig.
affects: >=0.0.0
breakingVersion 0.4.0 refactored to support Grunt 0.4.0+ breaking changes from 0.3.x.
fix
Update to Grunt 0.4.0+ and upgrade plugin to 0.4.0+.
affects: <0.4.0
deprecatedThe component ecosystem is largely abandoned; consider modern alternatives like Webpack or Parcel.
fix
Migrate away from component(1) to a supported build system.
affects: >=0.0.0
Errors
Common errors & fixes
Warning: Task "componentbuild" not found.
Plugin not loaded or not installed.
fix
Run `npm install grunt-component-build --save-dev` and add `grunt.loadNpmTasks('grunt-component-build');` to Gruntfile.
Running "componentbuild:dev" (componentbuild) task Fatal error: Cannot find module 'component-build2'
Missing peer dependency component-build2.
fix
Install component-build2: `npm install component-build2 --save-dev`
Fatal error: Unable to read component.json file
Missing component.json in the source directory.
fix
Ensure a valid component.json exists in the source path.
Error: build.use is not a function
Builder2.js plugin using old builder API.
fix
Use plugins that support builder2.js or update plugin code.
Upgrade
Version history
0.5.3latest on npm
Audit
Dependencies
component-build2requiredCore library for building components
gruntrequiredPeer dependency for Grunt plugin
Agent activity
6 hits · last 30 days
node
6
Resources
grunt-component-build — npm install grunt-component-build · libregistry