Pakku

raw JSON →
1.4.1 verified Sat Apr 25 auth: no javascript

Pakku (v1.4.1) is a command-line web bundler and compiler that processes entire web sites: it scans for assets, links, pages, and images; versionizes filenames using Git commit IDs (cache busting); optimizes/minifies HTML, JavaScript, CSS, Less, JPEG, PNG, GIF, SVG; and supports data attributes for inline expansion and dev-only stripping. Differentiated by its holistic site-centric approach (vs module bundlers like Webpack) and zero-config philosophy. Released under MIT/BSD. Maintained on GitHub (zanona/pakku). Release cadence is irregular; latest stable v1.4.1 (2020-03-29). Requires Node >=6.

error ENOENT: no such file or directory, open '...'
cause Input file path does not exist or is incorrect.
fix
Check that the path to index.html is relative to current working directory and file exists.
error pakku: command not found
cause Pakku is not installed globally or npx is not available.
fix
Run with npx: npx pakku ... or install globally: npm install -g pakku
error Cannot find module 'browserify'
cause Missing peer dependency (browserify) for JavaScript compilation.
fix
Install browserify: npm install browserify --save-dev
error Error: EACCES: permission denied, unlink '...'
cause Output directory or file is not writable.
fix
Ensure the output directory is writable; try running with elevated permissions (sudo) or change directory permissions.
breaking Output directory is deleted and re-created on every build.
fix Ensure output directory does not contain important files or back them up.
deprecated Node <6 no longer supported as of v1.0.0.
fix Upgrade Node.js to version >=6.
gotcha Asset versioning relies on Git commit ID; if not in a Git repo, version strings may be empty or broken.
fix Run pakku inside a Git repository to get proper cache-busting hashes.
gotcha HTML helpers like data-inline and data-dev only work on files processed by Pakku, not pre-minified or external.
fix Ensure input HTML is the original source, not already minified.
gotcha Node >=6 required; npm >=5.
fix Verify Node.js version with 'node --version' and npm with 'npm --version'.
npm install pakku
yarn add pakku
pnpm add pakku

Shows basic usage: create an HTML file, run pakku to build minified output with cache-busted filenames.

mkdir -p my-project/src my-project/dist
cd my-project
echo '<!DOCTYPE html><html><script>alert("hello")</script></html>' > src/index.html
npx pakku src/index.html dist
# Output: dist/index.html (minified) and dist/script.js?<hash> (if referenced)
echo "Build complete. Check dist/"