{"id":27854,"library":"grunt-component-build","title":"grunt-component-build","description":"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.","status":"maintenance","version":"0.5.3","language":"javascript","source_language":"en","source_url":"git://github.com/anthonyshort/grunt-component-build","tags":["javascript","gruntplugin","component(1)","component","builder.js","builder2.js"],"install":[{"cmd":"npm install grunt-component-build","lang":"bash","label":"npm"},{"cmd":"yarn add grunt-component-build","lang":"bash","label":"yarn"},{"cmd":"pnpm add grunt-component-build","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core library for building components","package":"component-build2","optional":false},{"reason":"Peer dependency for Grunt plugin","package":"grunt","optional":false}],"imports":[{"note":"Plugin is loaded as a Grunt task, not imported directly in code.","wrong":"const componentBuild = require('grunt-component-build');","symbol":"componentbuild","correct":"grunt.loadNpmTasks('grunt-component-build');"},{"note":"Should be saved as devDependency since it's a build tool.","wrong":"npm install --save grunt-component-build","symbol":"default import","correct":"npm install grunt-component-build --save-dev"},{"note":"Task name is all lowercase 'componentbuild' in configuration.","wrong":"grunt.config.set('componentBuild', { ... });","symbol":"task registration","correct":"grunt.initConfig({ componentbuild: { ... } });"}],"quickstart":{"code":"// Install: npm install grunt-component-build --save-dev\n// Gruntfile.js\nmodule.exports = function(grunt) {\n  grunt.loadNpmTasks('grunt-component-build');\n  grunt.initConfig({\n    componentbuild: {\n      options: {\n        name: 'myapp',\n        development: true\n      },\n      src: 'src/components',\n      dest: 'public/build'\n    }\n  });\n  grunt.registerTask('default', ['componentbuild']);\n};","lang":"javascript","description":"Shows how to install, load the plugin, and configure a basic build task."},"warnings":[{"fix":"Upgrade to 0.5.0+ and update component configuration to match builder2.js.","message":"Version 0.5.0 drops support for component-build <1.0.0; uses builder2.js API.","severity":"breaking","affected_versions":"<0.5.0"},{"fix":"Use Grunt 0.4.0 or later.","message":"Grunt 0.4.0+ required; older Grunt versions are unsupported.","severity":"deprecated","affected_versions":">=0.4.0"},{"fix":"Use 'componentbuild' in grunt.initConfig.","message":"Task name is 'componentbuild' (all lowercase), not 'componentBuild'.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Update to Grunt 0.4.0+ and upgrade plugin to 0.4.0+.","message":"Version 0.4.0 refactored to support Grunt 0.4.0+ breaking changes from 0.3.x.","severity":"breaking","affected_versions":"<0.4.0"},{"fix":"Migrate away from component(1) to a supported build system.","message":"The component ecosystem is largely abandoned; consider modern alternatives like Webpack or Parcel.","severity":"deprecated","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `npm install grunt-component-build --save-dev` and add `grunt.loadNpmTasks('grunt-component-build');` to Gruntfile.","cause":"Plugin not loaded or not installed.","error":"Warning: Task \"componentbuild\" not found."},{"fix":"Install component-build2: `npm install component-build2 --save-dev`","cause":"Missing peer dependency component-build2.","error":"Running \"componentbuild:dev\" (componentbuild) task Fatal error: Cannot find module 'component-build2'"},{"fix":"Ensure a valid component.json exists in the source path.","cause":"Missing component.json in the source directory.","error":"Fatal error: Unable to read component.json file"},{"fix":"Use plugins that support builder2.js or update plugin code.","cause":"Builder2.js plugin using old builder API.","error":"Error: build.use is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}