Show DEV: Introducing klap š - a zero config, zero dependency bundler for tiny javascript packages
Abhishek Shende
Posted on October 30, 2019
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
Posted on October 30, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 5, 2019