• Stars
    star
    1,610
  • Rank 29,055 (Top 0.6 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 2 years ago
  • Updated 22 days ago

Reviews

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

Repository Details

Optimizes static websites for best user experience and best Core Web Vitals scores.
     __                                    __    
    |__|____    _____ ___________    ____ |  | __
    |  \__  \  /     \\____ \__  \ _/ ___\|  |/ /
    |  |/ __ \|  Y Y  \  |_> > __ \\  \___|    < 
/\__|  (____  /__|_|  /   __(____  /\___  >__|_ \
\______|    \/      \/|  |       \/     \/     \/
                      |__|

npm version Discord

Jampack

Optimizes static websites for best user experience and best Core Web Vitals scores.

Brought to you by
‹div›RIOTS ‹div›RIOTS

What is jampack?

Not a bundler. Not a framework.

jampack is a post-processing tool that takes the output of your Static Site Generator (aka SSG) and optimizes it for best user experience and best Core Web Vitals scores.

Read the introduction blog post

What can jampack do?

<img>

<img src="./redpanda.jpg" alt="Red panda">

becomes responsive with dimensions:

<img src="./redpanda.jpg.webp" alt="Red panda" 
     srcset="
     ./redpanda.jpg.webp 3872w, ./[email protected] 3572w, ./[email protected] 3272w, 
     ./[email protected] 2972w, ./[email protected] 2672w, ./[email protected] 2372w,
     ./[email protected] 2072w, ./[email protected] 1772w, ./[email protected] 1472w,
     ./[email protected] 1172w, ./[email protected] 872w"
     sizes="100vw"
     loading="lazy"
     decoding="async"
     width="3872" 
     height="2592">

<picture>

<picture>
    <img src="./redpanda.jpg" alt="Red panda">
</picture>

becomes responsive with multiple formats including AVIF:

<picture>
    <source type="image/avif" 
            srcset="./[email protected] 1936w, ./[email protected] 1636w,
                    ./[email protected] 1336w, ./[email protected] 1036w,
                    ./[email protected] 736w">
    <source type="image/webp" 
            srcset="./[email protected] 1936w, ./[email protected] 1636w,
                    ./[email protected] 1336w, ./[email protected] 1036w,
                    ./[email protected] 736w">
    <img src="./redpanda.jpg" 
         alt="Red panda" 
         loading="lazy" 
         decoding="async" 
         width="1936" 
         height="1296" 
         srcset="./redpanda.jpg 1936w, ./[email protected] 1636w,
                 ./[email protected] 1336w, ./[email protected] 1036w,
                 ./[email protected] 736w"
         sizes="100vw">
</picture>

Above & below-the-fold

jampack optimizes assets above-the-fold ⬆️.

  • Images are loaded with higher priority.
  • Images are compress as Progressive JPEG.
  • Small images are embedded in HTML.

Lazy-load assets below-the-fold ⬇️.

  • Images and Iframes are lazy loaded.

See details.

All assets are compressed

In a 2nd PASS, jampack compresses all untouched assets and keep the same name and the same format.

Extension Compressor
.html,.htm html-minifier-terser
.css lightningCSS
.js swc
.svg svgo
.jpg,.jpeg sharp
.png sharp
.webp sharp
.avif sharp

And more!

See Documentation for all feature list and examples.

Quick use

# Optimize static website in `dist` folder
npx @divriots/jampack ./dist

For more options see CLI options.

jampack used in the wild

Add yours here

Why is it called jampack?

License

This software is released under the terms of the MIT license.

More Repositories

1

style-dictionary-to-figma

A utility that mutates and transforms a style-dictionary object into something Figma Tokens plugin understands.
JavaScript
102
star
2

style-dictionary-playground

Playground in the browser for style-dictionary
JavaScript
57
star
3

webcomponents.dev

Web Components IDE
53
star
4

story-to-design

Keep your Figma libraries true-to-code in a single click.
28
star
5

backlight.dev

Design Systems, Code-side
25
star
6

vite-plugin-bundled-entry

Vite plugin that generates a bundled entry file.
TypeScript
24
star
7

components.studio

The component IDE
23
star
8

simba

Lion-based Design System
JavaScript
22
star
9

universal-story-render

Universal story renderer, compatible with most JS UI frameworks out there.
TypeScript
20
star
10

vite-plugin-firebase

Vite plugin for firebase.
TypeScript
18
star
11

starter-yogi

TypeScript
13
star
12

starter-open-props

Open-props https://open-props.style
JavaScript
11
star
13

divriots-cake-recipe

Our awesome ‹div›RIOTS cake 🍰 recipe
11
star
14

starter-bricks

React MUI starter kit
TypeScript
7
star
15

starter-furious

Furious - a design system based on FAST Frame
JavaScript
7
star
16

walkthroughs.dev

5
star
17

play-user-event

Demo version of @testing-library/user-event, for use in storybook csf v3 play.
TypeScript
5
star
18

dockit-react

TypeScript
5
star
19

dockit-core

TypeScript
5
star
20

starter-origami

A react-native-paper based design system as a starter kit for Backlight
TypeScript
3
star
21

flying-boo

boo-ghost halloween component
TypeScript
2
star
22

starter-tailwindcss

TypeScript
2
star
23

infini-scroll

Webcomponent that infinitely scrolls through a list of nodes in horizontal direction.
JavaScript
2
star
24

starter-react-aria

SCSS
2
star
25

create-figma-plugin

TypeScript
2
star
26

whats-new

What's new app
Astro
1
star
27

csf-react-renderer

TS Template for es-modules
TypeScript
1
star
28

starter-figma-tokens

Figma Tokens Plugin starter kit
CSS
1
star
29

starter-stitches

Using stitches.dev
TypeScript
1
star
30

studio-doc-compiler

TS Template for es-modules
TypeScript
1
star
31

action-dsd-release

Github Action for releasing DSD-made Design Systems
TypeScript
1
star
32

spooky

Spooky
JavaScript
1
star
33

starter-lion-based

JavaScript
1
star
34

starter-react-sui

TypeScript
1
star
35

starter-style-dictionary

Style-Dictionary Starter kit - for Design Tokens
CSS
1
star
36

csf-helpers

Created with Components.studio
TypeScript
1
star
37

figma-to-website

1
star
38

esbuild-plugin-raw-loader

Adds !!raw-loader! webpack syntax support to esbuild
TypeScript
1
star
39

create-figma-plugin-ui

Backlight'ed version of @create-figma-plugin/ui
TypeScript
1
star
40

code.to.design

The only API for HTML to Figma
1
star