Registry / devops / builder-clean-css

builder-clean-css

JSON →
library0.0.0jsnpmunverified

A CSS minifier plugin for component/component-builder2. This package integrates clean-css into the component-builder2 pipeline to minify CSS during build. Version 0.0.0 is the only release, with no updates since 2014. It is deprecated as component-builder2 is no longer maintained. The plugin exposes a single function that returns a transform stream, following the builder plugin convention.

npm install builder-clean-css
INSTALL
IMPORT
SIG · BUILDER-CLEAN-CSS
B
builder-clean-css
devopsjavascriptv0.0.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.

default
var cleanCSS = require('builder-clean-css')
import cleanCSS from 'builder-clean-css'
CJS only, no ESM or TypeScript support
.use('styles', cleanCSS)
build.styles(branches, options).use('styles', cleanCSS(options))
.use(cleanCSS(options))
Must pass 'styles' as first argument to .use()
cleanCSS(options)
cleanCSS({/* options */})
new CleanCSS(options)
cleanCSS is a factory function, not a constructor

Shows how to use builder-clean-css as a plugin in component-builder2 to minify CSS during build.

var build = require('component-builder2'); var cleanCSS = require('builder-clean-css'); var branches = ['path/to/components']; var options = {}; build.styles(branches, options) .use('styles', cleanCSS({ /* clean-css options */ })) .pipe(process.stdout);
Debug
Known issues
deprecatedPackage is deprecated; component-builder2 and builder-clean-css are unmaintained.
fix
Migrate to a modern build tool like Webpack, Rollup, or Vite with a CSS minifier plugin.
affects: >=0.0.0
gotchaThe plugin does not provide TypeScript types; it is CJS-only.
fix
Use require and create custom type declarations if needed.
affects: >=0.0.0
gotchaThe .use('styles', ...) method requires the string 'styles' as the first argument; omitting it leads to a build error.
fix
Always pass 'styles' as the first argument to .use().
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: cleanCSS is not a function
Using import or incorrect require path.
fix
Use require('builder-clean-css') with CommonJS.
Error: .use() requires a name as first argument
Calling .use(cleanCSS()) without 'styles' parameter.
fix
Use .use('styles', cleanCSS()).
Module not found: Can't resolve 'component-builder2'
component-builder2 not installed.
fix
Install component-builder2: npm install component-builder2.
Upgrade
Version history
0.0.0latest on npm
Audit
Dependencies
component-builder2requiredpeer dependency required to use the plugin
clean-cssrequiredunderlying minification library
Agent activity
6 hits · last 30 days
node
6
Resources
builder-clean-css — npm install builder-clean-css · libregistry