Registry / devops / crude-build

crude-build

JSON →
library0.1.3jsnpmunverified

CrudeBuild.js is a minimalist JavaScript build tool for single-file libraries. Version 0.1.3 (released 2025) requires no configuration and has zero dependencies, automatically minifying files with Google Closure Compiler, generating browser-ready output, CommonJS (.cjs) and ES module (.mjs) exports, and extracting metadata headers from package.json. It is a lightweight alternative to tools like esbuild or rollup for simple projects. Released under the MIT license.

npm install crude-build
INSTALL
IMPORT
SIG · CRUDE-BUILD
C
crude-build
devopsjavascriptv0.1.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (CLI)
npx crude-build ModuleName
import crudeBuild from 'crude-build'
The package is designed as a CLI tool, not a library; the main entry exports nothing useful for programmatic use.
package.json scripts
"build": "crude-build ModuleName"
"build": "crude-build --entry ModuleName"
No CLI flags are supported; just pass the module name as argument.

Demonstrates zero-config build: install, add script, run, get formatted output.

// Install npm install crude-build // In package.json add: "scripts": { "build": "crude-build MyModule" } // Then run: npm run build // Output in dist/: MyModule.js (minified), MyModule.cjs, MyModule.mjs
crude-build --version
Debug
Known issues
gotchaThe argument to crude-build is the module name, not a file path. Using a path will fail silently or produce incorrect output.
fix
Use only the module name (e.g., 'MyModule') not a file path like 'src/index.js'.
affects: >=0.1
gotchaCrudeBuild relies on Google Closure Compiler via a bundled binary? Check license compliance; closure compiler uses Apache 2.0.
fix
Ensure your project complies with the Closure Compiler license if redistributing.
affects: >=0.1
gotchaNo configuration options; cannot customize minification, header format, or output directory.
fix
If you need customization, switch to a more mature tool like esbuild or rollup.
affects: >=0.1
gotchapackage.json must have 'name' and 'version' fields; otherwise header generation may error.
fix
Ensure your package.json contains at least name and version.
affects: >=0.1
Errors
Common errors & fixes
crude-build: command not found
Not installed globally or not in PATH.
fix
Use npx crude-build or install locally via npm i -D crude-build and run via npx.
Error: Cannot find module '...'
Missing input file (package.json or main entry).
fix
Run from project root with valid package.json and a main file.
Output file is empty or not minified
Module name argument mismatch or missing source file.
fix
Ensure the module name matches the source file (e.g., 'MyModule' expects 'MyModule.js' in current dir).
Upgrade
Version history
0.1.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
crude-build — npm install crude-build · libregistry