• Stars
    star
    729
  • Rank 62,157 (Top 2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 3 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An online tool to quickly bundle & minify your projects, while viewing the compressed gzip/brotli bundle size, all running locally on your browser.

bundlejs

✨ WOOOOOOH!! ✨ The bundlejs api is now out at deno.bundlejs.com and/or edge.bundlejs.com, bundle your code and get a badge.

Check out the announcement tweet

I see a badge, you see a badge, we all see badges!!!

spring-easing's badge

To create a badge just replace the domain bundlejs.com domain with deno.bundlejs.com and add /?badge, yeah, that simple

bundle - An online npm package bundle size checker | Product Hunt Open In Gitpod

A small online tool for checking the minified gzip/brotli size of npm packages.

I used monaco-editor for the code-editor, esbuild as bundler and treeshaker respectively, denoflate as a wasm port of gzip, deno_brotli as a wasm port of brotli, deno_lz4 as a wasm port of lz4, bytes to convert the compressed size to human readable values, esbuild-visualizer to visualize and analyze your esbuild bundle to see which modules are taking up space, umami for private, publicly available analytics and general usage stats all without cookies, and countapi-js to keep track of the number of page visits, in a private and secure way.

This project was greatly influenced by @hardfists neo-tools and @mizchi's uniroll projects.

bundlejs is a quick and easy way to bundle your projects, minify and see it's gzip size. It's an online tool similar to bundlephobia, but bundle does all the bundling locally on you browser and can treeshake and bundle multiple packages (both commonjs and esm) together, all without having to install any npm packages and with typescript support.

The project isn't perfect, and I am still working on an autocomplete, hover intellisence, better mobile support and the high memory usage of esbuild and monaco as well as some edge case packages, e.g. monaco-editor.

If there is something I missed, a mistake, or a feature you would like added please create an issue or a pull request and I'll try to get to it. You can contribute to this project at okikio/bundle.

bundle uses Conventional Commits as the style of commit, and the Commitizen CLI to make commits easier.

You can join the discussion on github discussions.

Some of bundlejs.com's latest features were inspired by egoist/play-esbuild and hyrious/esbuild-repl, check them out they each use esbuild in different ways.

URL Queries & Shareable Links

You can now use search queries in bundle, all you need to do is add this to the url
?q={packages}&treeshake={methods to treeshake}

e.g.
You want react, react-dom, vue, and @okikio/animate, but only want the Animate and toStr methods exported from @okikio/animate.

You would add this to the url bundlejs.com/?q=react,react-dom,vue,@okikio/animate&treeshake=[*],[*],[*],[{Animate,toStr}]

If you only want a couple packages and don't care to treeshake, then all you need is something like this, bundlejs.com?q=react,react-dom,vue,@okikio/animate

There is another way to share a reproduciable bundle, the sharable link. Shareble links look like this /?share=PTAEGEB... with the string value of the input code editor being compressed into a string and placed into the URL.

In order to create a shareble link, you click the Share button, it copies the share url to your clipboard, and from there you can paste where you wish.

If you would like to bundle your code when the share URL is loaded, add bundle to the url, e.g. /?bundle&q=@okikio/animate or /?bundle&share=PTAEGEBs...

Badges

You can also add bundle badges, they look like this,

Open Bundle Open Bundle

All you need to do is to add this to your README.md

# Light Mode Badge 
[![Open Bundle](https://bundlejs.com/badge-light.svg)](https://bundlejs.com/)

# Dark Mode Badge 
[![Open Bundle](https://bundlejs.com/badge-dark.svg)](https://bundlejs.com/)

Another options is to use the API, e.g.

spring-easing's badge

[![spring-easing's badge](https://deno.bundlejs.com/?q=spring-easing&badge=detailed&badge-style=for-the-badge)](https://bundlejs.com/?q=spring-easing)

You can use the URL Queries & Shareable Links above, to create unique bundles, when users clicks on the badge.

Backers & Sponsors

Backers & Sponsors are awesome people and organizations who use, enjoy, and donate to the project. The list of backers who love and support this project are,

More Repositories

1

inthistweet

✨ Futuristic ✨ twitter image, gif and video downloader. Enter a Tweet URL, click search, and download the image/videos in it.
TypeScript
177
star
2

native

An initiative which aims to make it easy to create complex, light-weight, and performant web applications using modern js api's.
TypeScript
93
star
3

spring-easing

Quick and easy spring animation. Works with other animation libraries (gsap, animejs, framer motion, motion one, @okikio/animate, etc...) or the Web Animation API (WAAPI).
TypeScript
64
star
4

sharedworker

A small spec. compliant polyfill for SharedWorkers, it acts as a drop in replacement for normal Workers.
JavaScript
36
star
5

transferables

Utility library that lists out all transferable objects (https://developer.mozilla.org/en-US/docs/Glossary/Transferable_objects) that can be transfered between Workers and the main thread
TypeScript
20
star
6

okikio

Okiki Ojo β€” Web Developer & Designer (Portfolio)
Astro
20
star
7

codemirror

A minor test of Codemirror
TypeScript
19
star
8

astro-auto-adapter

Choose Astro Adapters based off of the `ASTRO_ADAPTER_MODE` environment variable
TypeScript
11
star
9

ai-typescript-check

REST API for TypeScript linting and type/error checking, leveraging TypeScript TwoSlash for enhanced code analysis. Available as standalone API and even better as a ChatGPT plugin.
TypeScript
10
star
10

postcss-spring-easing

PostCSS plugin to add that bounce and boogie that only springs can bring
TypeScript
5
star
11

joseph

The repository for Joseph's portfolio.
JavaScript
3
star
12

astro-fluent-svelte

Created with StackBlitz ⚑️
Svelte
3
star
13

web-app

A template for web apps.
JavaScript
3
star
14

astro-partytown-repro

Created with StackBlitz ⚑️
Astro
3
star
15

codepoint-iterator

Fast uint8array to utf-8 codepoint iterator for streams and array buffers by @okikio & @jonathantneal
TypeScript
3
star
16

broadcast-channel-security-vulnerablility

Vulnerability in Broadcast Channel allowing for Arbitrary Code Execution when using Eval (In-direct and with "use strict")
CSS
3
star
17

url-parser

Gotta catch them all (URL parser)
JavaScript
2
star
18

astro-build

A test of astro js in a complex workspace, using pnpm, the workspace protocol, multiple linked packages, and typescript for everything..
SCSS
2
star
19

astro-form-data-easy-edition

Using Astro with FormData (easy mode)
TypeScript
2
star
20

astro-codespaces-error-repro

Astro codespaces error reproduction
Astro
2
star
21

deno-github-proxy

Allows for easy imports of ts files from GitHub while still keeping type inferencing (for Deno)
TypeScript
2
star
22

astro-mdx

Created with StackBlitz ⚑️
JavaScript
2
star
23

astro-form-data

Using Astro with FormData (difficult mode)
JavaScript
2
star
24

testing-opfs

Created with StackBlitz ⚑️
TypeScript
2
star
25

megacmd-docker

MegaCMD Docker Container for Red Hat Linux
Dockerfile
1
star
26

server-sent-events

Experiments with Server Sent Events
TypeScript
1
star
27

skf-examination-platform

Astro
1
star
28

science-app

The web app for the science web site.
JavaScript
1
star
29

dnd-solid-astro

Created with StackBlitz ⚑️
TypeScript
1
star
30

codemirror-ide

TypeScript
1
star
31

modern-guacamole

A modern rendition of guacamole in typescript and nodejs
TypeScript
1
star
32

leader-app

A web app for my leadership class.
Pug
1
star
33

inertia-v3_beta

JavaScript
1
star
34

astro-solidjs-v1.5.1-error

Created with StackBlitz ⚑️
TypeScript
1
star
35

vercel-edge-function-test

Created with StackBlitz ⚑️
TypeScript
1
star
36

esbuild-wasm-treeshake-repro

esbuild-wasm treeshake reproduction. esbuild isn't able to treeshake quite as well when using plugins https://github.com/evanw/esbuild/issues/3129
TypeScript
1
star
37

aiscode

JavaScript
1
star
38

starter

A starter pack
1
star