DEV Community

Abhishek Shende
Abhishek Shende

Posted on • Updated 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)