ReviewOS

also looking at this

stacks/ts-css

Merge @stacksjs/ts-css into this repo as packages/toolkit

#27
Merged glennmichael123 wants to merge merge/ts-css-toolkit into main
128 files +9797 -201
packages/toolkit/docs/install.mdadded+76-0
Changes to packages/toolkit/docs/install.md
@@ -0,0 +1,76 @@
1# Install
2
3`@stacksjs/ts-css` is a single package. There are no transitive dependencies.
4
5## Package managers
6
7::: code-group
8
9```sh [bun]
10bun add @stacksjs/ts-css
11# or, dev dependency
12bun add --dev @stacksjs/ts-css
13```
14
15```sh [npm]
16npm install @stacksjs/ts-css
17# or, dev dependency
18npm install --save-dev @stacksjs/ts-css
19```
20
21```sh [pnpm]
22pnpm add @stacksjs/ts-css
23# or, dev dependency
24pnpm add --save-dev @stacksjs/ts-css
25```
26
27```sh [yarn]
28yarn add @stacksjs/ts-css
29```
30
31:::
32
33## Local development with `bun link`
34
35If you're contributing to ts-css and want to test the changes against
36another project locally, register it once with `bun link`:
37
38```sh
39# inside the ts-css repo
40bun link
41
42# inside the consumer project
43bun link @stacksjs/ts-css
44```
45
46That's how [`ts-svg`](https://github.com/stacksjs/ts-svg) consumes ts-css
47during development — its `package.json` carries
48`"@stacksjs/ts-css": "link:@stacksjs/ts-css"`.
49
50## CLI binary (optional)
51
52The `ts-css` CLI ships with the package and is exposed via Bun's `bin`
53field. After installing, you can run:
54
55```sh
56bunx ts-css minify input.css
57```
58
59For a standalone binary, build from source:
60
61```sh
62bun run compile # builds bin/ts-css for your platform
63bun run compile:all # cross-compile for darwin/linux/windows
64```
65
66## Verifying the install
67
68```ts
69import { minify, parse } from '@stacksjs/ts-css'
70
71console.log(minify('.a { color: #aabbcc }').css)
72// → ".a{color:#abc}"
73```
74
75If that prints the minified output, you're set. Continue to
76[**Getting started**](./intro.md).