{"library":"metalsmith-bundled-components","title":"Metalsmith Bundled Components","description":"A Metalsmith plugin (v0.9.1, active development) that automatically discovers, orders, and bundles CSS/JS files from component-based architectures using esbuild. It scans directories for components, validates requirements, resolves CSS @imports, and produces minified bundles with tree shaking. Key differentiators: convention-over-configuration with sensible defaults, support for both ESM and CommonJS, PostCSS integration via esbuild plugins, and a validation system for component properties to catch configuration errors early. Requires Node >=18.0.0 and metalsmith ^2.5.0 as a peer dependency. Release cadence is irregular with several major feature updates in 2024.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install metalsmith-bundled-components"],"cli":null},"imports":["import bundledComponents from 'metalsmith-bundled-components'","const bundledComponents = require('metalsmith-bundled-components');","import type { Options } from 'metalsmith-bundled-components'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import Metalsmith from 'metalsmith';\nimport bundledComponents from 'metalsmith-bundled-components';\nimport { fileURLToPath } from 'url';\nimport { dirname } from 'path';\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nMetalsmith(__dirname)\n  .use(bundledComponents({\n    basePath: 'components/base',\n    sectionsPath: 'components/sections',\n    cssDest: 'assets/bundle.css',\n    jsDest: 'assets/bundle.js'\n  }))\n  .build((err) => {\n    if (err) throw err;\n  });","lang":"typescript","description":"Shows basic usage with custom component paths and bundled output destinations.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}