A Node.js module that bundles and minifies CSS and JS assets referenced in HTML comment-bounded sections into single files. It reads an HTML entry point, replaces stylesheet link and script tags between user-defined start/end comment markers with a single combined and minified file per section. Version 1.0.9. No recent updates; relies on uglify-js and clean-css internally. Simpler than Webpack/Parcel but limited to comment-based bundling.
npm install static-html-bundlerVerified import paths — ran on the pinned version, not inferred.
Demonstrates running static-html-bundler with common options for CSS and JS bundling via comment markers.
Use require() style and ensure Node.js version supports CommonJS.
Verify start and end comment strings match exactly including HTML comment syntax.
Ensure distJsFolder and distCssFolder have trailing slash (e.g., 'js/' rather than 'js').
Consider using modern alternatives like Webpack, Parcel, or Vite for active maintenance.
Install via npm install static-html-bundler and require with correct path: require('./node_modules/static-html-bundler/bundler') or require('static-html-bundler') is not supported; use full relative path.Use const staticHtmlBundler = require('static-html-bundler/bundler'); (note: bare specifier may not work; use relative path).Verify sourceFolder and inputHtml options point to existing files relative to the working directory.