Skip to content

Commit 3f61664

Browse files
committed
chore: wip
1 parent c4e1a63 commit 3f61664

File tree

2 files changed

+60
-7
lines changed

2 files changed

+60
-7
lines changed

README.md

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ A blazingly fast, utility-first CSS framework built with Bun. Headwind generates
1717
- 🎨 **Tailwind-Compatible** - Familiar utility classes and syntax
1818
- 💪 **Fully Typed** - Complete TypeScript support with type-safe configuration
1919
- 🔧 **Highly Configurable** - Customize theme, colors, spacing, variants, and more
20-
- 📦 **Zero Dependencies** - Minimal footprint, maximum performance
20+
- 📦 **Zero Runtime Dependencies** - Minimal footprint, maximum performance
2121
- 🔥 **Hot Reload** - Watch mode for instant rebuilds during development
2222
- 🎭 **Variant Support** - Responsive, state (hover, focus, etc.), dark mode, and custom variants
2323
-**Modern CSS Features** - Grid, Flexbox, animations, transforms, filters, and more
24+
- 🔨 **Class Compilation** - Optimize HTML by compiling utility groups into single class names
2425
- 🧪 **Thoroughly Tested** - 860+ tests including comprehensive performance benchmarks
2526
- 🚀 **Production Ready** - Minification, preflight CSS, and optimized builds
2627
- ⌨️ **CLI & API** - Use via command line or programmatic API
@@ -37,15 +38,22 @@ npm install headwind
3738

3839
### Quick Start
3940

40-
1. **Create a configuration file** (`headwind.config.ts`):
41+
1. **Initialize Headwind**:
42+
43+
```bash
44+
# Create a config file
45+
bunx headwind init
46+
```
47+
48+
This creates a `headwind.config.ts` file:
4149

4250
```typescript
4351
import type { HeadwindConfig } from 'headwind'
4452

4553
export default {
4654
content: ['./src/**/*.{html,js,ts,jsx,tsx}'],
47-
output: './dist/styles.css',
48-
minify: true,
55+
output: './dist/headwind.css',
56+
minify: false,
4957
} satisfies Partial<HeadwindConfig>
5058
```
5159

@@ -86,6 +94,21 @@ const result = await build({
8694
console.log(`Generated ${result.classes.size} classes in ${result.duration}ms`)
8795
```
8896

97+
## CLI Commands
98+
99+
Headwind provides a comprehensive CLI:
100+
101+
```bash
102+
headwind build # Build CSS once
103+
headwind watch # Build and watch for changes
104+
headwind init # Create config file
105+
headwind analyze # Analyze utility class usage
106+
headwind clean # Remove output CSS file
107+
headwind preflight # Generate preflight CSS only
108+
headwind --version # Show version
109+
headwind --help # Show help
110+
```
111+
89112
## Configuration
90113

91114
Headwind supports extensive configuration options:
@@ -153,6 +176,8 @@ export default {
153176
} satisfies Partial<HeadwindConfig>
154177
```
155178

179+
For more configuration options, see the [Configuration Guide](https://headwind.stacksjs.org/config).
180+
156181
## Available Utilities
157182

158183
Headwind provides a comprehensive set of utility classes compatible with Tailwind CSS:
@@ -190,6 +215,24 @@ Headwind supports arbitrary values for maximum flexibility:
190215
</div>
191216
```
192217

218+
### Compile Class (HTML Optimization)
219+
220+
Optimize your HTML by compiling utility groups into single class names:
221+
222+
```html
223+
<!-- Before -->
224+
<div class=":hw: flex items-center justify-between px-4 py-2 bg-white rounded-lg shadow-md">
225+
Content
226+
</div>
227+
228+
<!-- After build -->
229+
<div class="hw-2k9d3a">
230+
Content
231+
</div>
232+
```
233+
234+
This reduces HTML file size by up to 60%. Learn more in the [Compile Class documentation](https://headwind.stacksjs.org/features/compile-class).
235+
193236
## Testing
194237

195238
Headwind includes a comprehensive test suite with 860+ tests:
@@ -253,9 +296,19 @@ bun run typecheck
253296
bun run build
254297
```
255298

299+
## Documentation
300+
301+
For comprehensive documentation, visit [headwind.stacksjs.org](https://headwind.stacksjs.org)
302+
303+
- [Installation Guide](https://headwind.stacksjs.org/install)
304+
- [Usage Guide](https://headwind.stacksjs.org/usage)
305+
- [Configuration](https://headwind.stacksjs.org/config)
306+
- [CLI Reference](https://headwind.stacksjs.org/features/cli)
307+
- [API Reference](https://headwind.stacksjs.org/api-reference)
308+
256309
## Changelog
257310

258-
Please see our [releases](https://github.com/stackjs/headwind/releases) page for more information on what has changed recently.
311+
Please see our [releases](https://github.com/stacksjs/headwind/releases) page for more information on what has changed recently.
259312

260313
## Contributing
261314

docs/.vitepress/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const analyticsHead: HeadConfig[] = [
1212
'script',
1313
{
1414
'src': 'https://cdn.usefathom.com/script.js',
15-
'data-site': 'DCOEHMGA',
15+
'data-site': 'WHNYEUDV',
1616
'defer': '',
1717
},
1818
],
@@ -103,7 +103,7 @@ export default withPwa(
103103
['meta', { name: 'author', content: 'Stacks.js, Inc.' }],
104104
['meta', {
105105
name: 'tags',
106-
content: 'headwind, css framework, utility-first, tailwind, bun, typescript, fast, lightweight',
106+
content: 'headwind, css framework, utility-first, tailwind, unocss, bun, typescript, fast, lightweight',
107107
}],
108108

109109
['meta', { property: 'og:type', content: 'website' }],

0 commit comments

Comments
 (0)