{"id":18254,"library":"crude-build","title":"CrudeBuild.js","description":"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.","status":"active","version":"0.1.3","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/rawify/CrudeBuild.js","tags":["javascript","bundler"],"install":[{"cmd":"npm install crude-build","lang":"bash","label":"npm"},{"cmd":"yarn add crude-build","lang":"bash","label":"yarn"},{"cmd":"pnpm add crude-build","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package is designed as a CLI tool, not a library; the main entry exports nothing useful for programmatic use.","wrong":"import crudeBuild from 'crude-build'","symbol":"default (CLI)","correct":"npx crude-build ModuleName"},{"note":"No CLI flags are supported; just pass the module name as argument.","wrong":"\"build\": \"crude-build --entry ModuleName\"","symbol":"package.json scripts","correct":"\"build\": \"crude-build ModuleName\""}],"quickstart":{"code":"// Install\nnpm install crude-build\n\n// In package.json add:\n\"scripts\": {\n  \"build\": \"crude-build MyModule\"\n}\n\n// Then run:\nnpm run build\n\n// Output in dist/: MyModule.js (minified), MyModule.cjs, MyModule.mjs","lang":"javascript","description":"Demonstrates zero-config build: install, add script, run, get formatted output."},"warnings":[{"fix":"Use only the module name (e.g., 'MyModule') not a file path like 'src/index.js'.","message":"The argument to crude-build is the module name, not a file path. Using a path will fail silently or produce incorrect output.","severity":"gotcha","affected_versions":">=0.1"},{"fix":"Ensure your project complies with the Closure Compiler license if redistributing.","message":"CrudeBuild relies on Google Closure Compiler via a bundled binary? Check license compliance; closure compiler uses Apache 2.0.","severity":"gotcha","affected_versions":">=0.1"},{"fix":"If you need customization, switch to a more mature tool like esbuild or rollup.","message":"No configuration options; cannot customize minification, header format, or output directory.","severity":"gotcha","affected_versions":">=0.1"},{"fix":"Ensure your package.json contains at least name and version.","message":"package.json must have 'name' and 'version' fields; otherwise header generation may error.","severity":"gotcha","affected_versions":">=0.1"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use npx crude-build or install locally via npm i -D crude-build and run via npx.","cause":"Not installed globally or not in PATH.","error":"crude-build: command not found"},{"fix":"Run from project root with valid package.json and a main file.","cause":"Missing input file (package.json or main entry).","error":"Error: Cannot find module '...'"},{"fix":"Ensure the module name matches the source file (e.g., 'MyModule' expects 'MyModule.js' in current dir).","cause":"Module name argument mismatch or missing source file.","error":"Output file is empty or not minified"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}