CLI molique-jit
The command line you use to drive the molique JIT engine: building, live watch mode, configuration - plus 8 generators for ready-made HTML blocks.
1. Installation
The package is published on npm as molique-jit.
Usually a dev dependency is all you need:
npm install --save-dev molique-jit
Or without installing, one-off via npx:
npx molique-jit init
npx molique-jit build
Package page: npmjs.com/package/molique-jit. The source code is public in the repository: github.com/rafalrozacki-debug/molique.
2. The molique.config.mjs file
The init command creates this file for you, with
comments on every field. A full, hand-written example:
// molique.config.mjs
export default {
// Where to look for class names.
content: ['**/*.html', '**/*.php'],
// Where to write the resulting CSS.
output: 'css/molique-jit.css',
// ONLY classes specific to your project (e.g. composed in PHP).
// molique's own runtime classes (toasts, carousel, .is-* states) don't
// need to be listed here - the engine includes them automatically.
safelist: ['badge-success', 'badge-danger'],
minify: true,
};
If your project has several independent pages (e.g. a main site
and a separate campaign landing page), the targets
field replaces content/output above
and builds each target independently - the landing page gets
its own small CSS file, with nothing else in it:
export default {
targets: [
{ content: ['src/**/*.html'], output: 'css/molique-jit.css' },
{ content: ['landing-campaign.html'], output: 'css/landing-campaign.css' },
],
};
| Field | Default | Description |
|---|---|---|
content |
['**/*.html', '**/*.php'] |
Where to look for classes (glob patterns). |
output |
css/molique-jit.css |
Path of the output file. |
safelist |
[] |
Classes from your own project the scan might miss (e.g. composed on the backend). |
minify |
true |
Currently effectively a no-op - the source data is already compressed at the source. |
targets |
- | A list of independent builds; when present, replaces content/output. |
3. Engine commands
The binary is called molique-jit (not just
molique), to avoid colliding with other tools that
use a shorter name. The CLI understands commands in English,
but also their Polish and German equivalents - handy for teams
that work day-to-day in one of those languages.
| English (canonical) | Polish alias | German alias | What it does |
|---|---|---|---|
init |
start |
start |
Creates a molique.config.mjs file with a sample config. |
build |
buduj |
bauen |
Compiles CSS to the output file(s) once. |
watch |
obserwuj |
beobachten |
Watches files and rebuilds live (~50ms debounce). |
--minify / -m |
--minifikuj |
--minifizieren |
Forces output compression. |
--config / -c |
--konfiguracja |
--konfiguration |
Points to a custom config file path. |
All three language variants do exactly the same thing:
npx molique-jit init
npx molique-jit build --minify
npx molique-jit watch --config ./custom.config.mjs
npx molique-jit start
npx molique-jit buduj --minifikuj
npx molique-jit obserwuj --konfiguracja ./custom.config.mjs
npx molique-jit start
npx molique-jit bauen --minifizieren
npx molique-jit beobachten --konfiguration ./custom.config.mjs
Exit codes
build exits with 0 on success and
1 on error (e.g. the config points to a folder
that doesn't exist) - handy to wire into CI, e.g. as a step
before publishing.
4. Component generators: make:*
A separate command family, independent of building CSS. Each
one runs an interactive wizard in the terminal (arrow keys +
Enter) and prints a ready, paste-in HTML block at the end -
matching, character for character, the real, working examples
in this documentation. make:component itself
doesn't generate anything - it prints a list of every
available generator, so you don't have to memorize the names:
npx molique-jit make:component
| Command | Polish alias | German alias | Generates |
|---|---|---|---|
make:modal |
zrob:modal |
mache:modal |
Modal (<dialog>) - Standard / Confirm / Context |
make:layout |
zrob:uklad |
mache:layout |
Page skeleton - Admin Dashboard / Hero (Simple + Cutout) / Bento Grid |
make:nav |
zrob:nawigacje |
mache:nav |
Navbar - offcanvas, 3 background variants, optional Mega Menu / Theme Switch / Language Switch |
make:table |
zrob:tabele |
mache:tabelle |
B2B table with automatic mobile data-label cards |
make:chart |
zrob:wykres |
mache:diagramm |
CSS/SVG chart - Radial Bar / Funnel / Pipeline / Stock Bar |
make:form |
zrob:formularz |
mache:formular |
Form - Floating Labels / Classic, optional Searchable Select / Premium Multi Select / Drag & Drop File Upload |
make:popover |
zrob:popover |
mache:popover |
.popover-context context menu (CSS Anchor Positioning) |
make:widget |
zrob:widget |
mache:widget |
Speed Dial / Before-After Slider / Stepper / Share Bar |
make:component |
- | Prints this list (not a generator) | |
The -n, --count flag
Every generator that produces a variable-length list (menu
items, table rows, chart stages…) accepts
-n, --count <n> - it skips ONLY the "how
many?" prompt; the rest of the wizard (labels, variants,
colors) still runs interactively:
npx molique-jit make:modal
npx molique-jit make:table --count 5
At the end of each generator you choose whether the code goes straight to the console (to copy with your mouse) or gets saved to a file - the tool never overwrites an existing file without an explicit confirmation.