On npm

molique JIT

An engine that generates only the CSS you actually use - no PurgeCSS, no safelist, no guessing. Driven from the command line - see CLI molique-jit.

The molique-jit package is published on npm

npm install --save-dev molique-jit
npx molique-jit init
npx molique-jit build

Full installation, configuration and the complete command reference are on the CLI molique-jit page. Package page: npmjs.com/package/molique-jit.

1. How this differs from PurgeCSS

The PurgeCSS & safelist page describes a "big to small" approach - you take the full, compiled molique CSS and cut out anything not found in your files. It works, but it needs a safelist (because some classes are only added by JavaScript) and carries risk: if PurgeCSS misses something and you forget the safelist, a component silently stops working.

molique-jit works the other way around: it starts from nothing and adds only the classes it actually found as literal text in your HTML/JS files. It never deletes anything, so there's nothing to "forget" in a safelist - classes triggered by JavaScript (toasts, lightbox, .is-* states) are built into the engine as always-included, exactly like in the ready-made PurgeCSS safelist.

PurgeCSS (available today) molique-jit (preview)
Starting point The full compiled molique-style.css Nothing - only adds matched classes
Needs a safelist Yes, wired in manually (purgecss.safelist.cjs) No - runtime classes are built into the engine
Live watch mode Needs its own wiring (e.g. a PostCSS plugin) Built in: watch
HTML component generator None 8 make:* generators (see the CLI)

You don't have to pick one forever

Both paths solve the same problem (a smaller production CSS file) in different ways. molique-jit is a simpler, zero-config alternative to PurgeCSS for new projects - the PurgeCSS page stays for anyone who'd rather plug it into an existing build pipeline.

2. How it works (in short)

molique's utility classes (.pb-md-4, .text-hover-primary, etc.) aren't arbitrary - they form a finite, fully known set, computed once when the framework is compiled. That's why the JIT engine never calculates CSS on the fly - instead it works like a dictionary:

1

Scans

Reads your files (HTML, JS, PHP - whatever you point it at via content) and pulls out every token that looks like a class name.

2

Matches

Checks every token against a ready-made dictionary of molique classes (a lookup, not a calculation). A token outside the dictionary is just your own class - not an error.

3

Copies

Outputs ready CSS rules 1:1 from the real, compiled framework, preserving @layer ordering.

The result: the output file is byte-for-byte identical to what the full molique-style.css would give you for the same classes - the engine never invents or recalculates anything on its own.

How do you use it?

You drive the engine with init/build/watch from the command line - installation, the config file, the full command reference (with Polish and German aliases) and the HTML component generator are all on a separate CLI page.

Open the CLI docs