|
| 1 | +# **Sklair 0.1.0 🎉** |
| 2 | + |
| 3 | +*HTML deserved better.* |
| 4 | + |
| 5 | +This is the **first official release** of Sklair - a compiler that brings structure, composability, and performance back to plain HTML without turning the web into a JavaScript framework. |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## What's included in v0.1.0 🥹 |
| 10 | + |
| 11 | +This release is a bit more than just a prototype, its a complete pipeline that works. But as always, improvements can be made. |
| 12 | + |
| 13 | +### Component system |
| 14 | + |
| 15 | +- HTML files act as components |
| 16 | +- Components can define both `<head>` and `<body>` content |
| 17 | +- Head nodes are automatically deduplicated across components |
| 18 | +- Components are cached lazily for performance |
| 19 | + |
| 20 | +### Heuristic head ordering pass |
| 21 | + |
| 22 | +Sklair doesn’t just concatenate `<head>` tags, it **understands** them. |
| 23 | + |
| 24 | +- Nodes are classified (charset, viewport, styles, scripts, analytics, SEO, etc.) |
| 25 | +- They are sorted into an optimal order |
| 26 | +- Duplicates are removed using structural hashing |
| 27 | +- Social meta (OpenGraph + Twitter) and others which have no effect on what a user sees at all is grouped and placed at the end |
| 28 | + |
| 29 | +### Ordering barriers |
| 30 | + |
| 31 | +During the head ordering pass, some things might break if they are moved around in the wrong order. |
| 32 | + |
| 33 | +The best example I can think of is importing `cdn.tailwindcss.com` and needing `tailwind.config` to come *after* the TailwindCSS script is imported, not before. |
| 34 | + |
| 35 | +Some things must stay together. Sklair lets you enforce that. |
| 36 | + |
| 37 | +```html |
| 38 | +<!-- sklair:ordering-barrier treat-as=dont-care --> |
| 39 | +<meta property="og:title" …> |
| 40 | +<meta name="twitter:title" …> |
| 41 | +<!-- sklair:ordering-barrier-end --> |
| 42 | +``` |
| 43 | + |
| 44 | +Sklair will keep those nodes together while still optimising everything else. |
| 45 | + |
| 46 | +### `sklair:remove` |
| 47 | + |
| 48 | +You can include tags for editor previews that will **never ship**: |
| 49 | + |
| 50 | +```html |
| 51 | +<!-- sklair:remove --> |
| 52 | +<script src="https://cdn.tailwindcss.com"></script> |
| 53 | +<!-- sklair:remove-end --> |
| 54 | +``` |
| 55 | + |
| 56 | +This is perfect for things like component previews in VSCode without polluting production builds. |
| 57 | + |
| 58 | +### gitignore-style excludes |
| 59 | + |
| 60 | +No more ugly `**/**/**`, Sklair now accepts gitignore-style excludes which are automatically normalised to doublestar globs. |
| 61 | + |
| 62 | +```json |
| 63 | +"exclude": [ |
| 64 | + ".git", |
| 65 | + "node_modules", |
| 66 | + ".env*", |
| 67 | + "*.psd", |
| 68 | + "!important.psd" |
| 69 | +] |
| 70 | +``` |
| 71 | + |
| 72 | +### `sklair serve` |
| 73 | + |
| 74 | +A real development server with file watching via [fsnotify](https://github.com/fsnotify/fsnotify), automatic rebuilds, websocket-based live reload, and support for custom user-created 404 pages. |
| 75 | + |
| 76 | +### ⚙️ Proper CLI |
| 77 | + |
| 78 | +- `sklair build` |
| 79 | +- `sklair config` |
| 80 | +- `sklair docs` |
| 81 | +- `sklair init` |
| 82 | +- `sklair serve` |
| 83 | +- `sklair version` |
| 84 | +- Global `--debug`, `--verbose`, `--silent` verbosity flags |
| 85 | + |
| 86 | +Note that the verbosity flags must come before any command. E.g. `sklair --debug build`. |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +## Whats next |
| 91 | + |
| 92 | +0.1.0 is the foundation, for now. Coming next will be component nesting, circular dependency detection, dynamic resource hints, full Lua block support, a stable pre/post-build hook system, and finally distribution of sklair via package managers like brew, winget and maybe apt. |
| 93 | + |
| 94 | +--- |
| 95 | + |
| 96 | +**HTML deserved better. |
| 97 | +Now it has Sklair.** |
0 commit comments