DEV Community

Abhishek Shende
Abhishek Shende

Posted on • Edited on

Show DEV: Introducing klap πŸ‘ - a zero config, zero dependency bundler for tiny javascript packages

Aloha Dev.to community πŸ‘‹

I recently authored a zero config (0cJS), zero dependency tool to publish tiny NPM packages. The motivation behind klap is to provide best practices setup for Modern Javascript Packages, while focusing on zero configuration and zero dependency.

✨ Features

πŸŽ‰ zero config: bundle your library using only a package.json
πŸ’₯ zero config: typescript support (just rename *.js to *.ts)
🌟 zero config: code transforms using babel macros
πŸš€ zero dependency: uses gcc-style bundling.
πŸ’‡ tiny bundles for all inputs
πŸ”₯ Modern JS syntax with class properties, async/await, and generators
🎊 Supports react and styled-components out of the box.
πŸ™ creates multiple output formats cjs, esm and umd
⚑ Built in Minification and Gzip Size Tracking
πŸŒ€ Built in development server for quick prototyping.

πŸ”— Github Repo

https://github.com/osdevisnot/klap

klap is powered by babel and rollup, but uses gcc-style bundling to achieve zero-dependency.

Feel free to 🌟 the github repo if you like the approach

🐭 Examples

https://github.com/osdevisnot/klap/tree/master/examples

The examples folder showcases usage of the bundler for few scenarios.

Give it a try next time you want to publish a package to NPM

Top comments (0)