CrudeBuild.js is a simple JavaScript build tool designed to handle minification and header generation tasks for single file libraries, with no configuration needed. It supports the generation of CommonJS and ES module exports.
- Minification: Automatically minifies your JavaScript files for optimized production builds.
- Header Generation: Extracts metadata from your
package.json
file to generate headers for your build output. - Zero Configuration: Works out of the box without any need for configuration files.
- Zero Dependencies: Lightweight and self-contained with no external dependencies.
- CommonJS and ESM Export Generation: Automatically generates both CommonJS (
.cjs
) and ES module (.mjs
) exports for easy module consumption.
Install CrudeBuild.js using npm:
npm install crude-build
Once installed, you can add it to the scripts of your package.json
:
"build": "crude-build ModuleName",
By default, CrudeBuild.js will:
- Create browser JavaScript files that get minified using Closure Compiler.
- Generate output files in the
dist/
folder. - Add a header to the output file, which includes metadata (name, version, author) from your
package.json
. - Create both
.cjs
(CommonJS) and.mjs
(ES Module) files in thedist/
folder for cross-environment compatibility.
Copyright (c) 2025, Robert Eisele Licensed under the MIT license.