@iksnerd/blazon 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -16
- package/dist/chunks/{site-builder-vpzUWoiA.js → site-builder-CPfjBOmR.js} +1312 -1285
- package/dist/cli/index.js +1 -1
- package/dist/core/checker/catalogue.d.ts +16 -0
- package/dist/core/checker/catalogue.d.ts.map +1 -1
- package/dist/core/docs/directives.d.ts +9 -0
- package/dist/core/docs/directives.d.ts.map +1 -1
- package/dist/core/docs/parser.d.ts.map +1 -1
- package/dist/core/tokens/walk.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/plugins/roles/roles.d.ts +4 -0
- package/dist/plugins/roles/roles.d.ts.map +1 -1
- package/dist/ui/assets/{index-DluSqfla.css → index-D0WCUmtA.css} +1 -1
- package/dist/ui/assets/{index-BdbihVvH.js → index-DhSc0Zxv.js} +45 -47
- package/dist/ui/index.html +2 -2
- package/package.json +1 -1
- package/plugins/blazon.print-book/README.md +3 -1
- package/plugins/blazon.print-book/bin/blazon-blazon.print-book./360/237/224/214 +7 -1
- package/plugins/shipped.lock +1 -1
- package/template/docs/01-principles.md +1 -1
package/README.md
CHANGED
|
@@ -10,26 +10,21 @@ Design tokens, guidelines and brand assets in one repo, compiled into CSS, TypeS
|
|
|
10
10
|
|
|
11
11
|
Brand guidelines usually live in a PDF or a slide deck, and the values developers need are copied out of it by hand. Blazon keeps them in the repo as [DTCG](https://www.designtokens.org/TR/2025.10/format/) (Design Tokens Community Group) token files and Markdown. One build writes the CSS variables, a typed TypeScript module and a static brand book, and `blazon check` fails the build when a token breaks the brand's own rules. It reads the same DTCG files as Style Dictionary and Tokens Studio, and adds the rules, the checks and the book.
|
|
12
12
|
|
|
13
|
-
> **Status: pre-release (0.1.0)
|
|
14
|
-
>
|
|
15
|
-
> Once published, run it with `npx @iksnerd/blazon`, or install it in a project and run `npx --no-install blazon` or `./node_modules/.bin/blazon`. The name can still change before the first publish.
|
|
13
|
+
> **Status: pre-release (0.1.0), on npm as `@iksnerd/blazon`.** It is 0.x, so a minor version may break ([versioning](#versioning-and-stability)). The npm package named `blazon` is an unrelated project (a type checker): `npx blazon` in a folder where `@iksnerd/blazon` is not installed runs that one, not this tool. Run it with `npx @iksnerd/blazon <command>`, or install it and run `npx blazon` (the installed program wins) or `./node_modules/.bin/blazon`.
|
|
16
14
|
|
|
17
15
|
Jump to: [Quick start](#quick-start), [Set up with your agent](#set-up-with-your-agent), [Use blazon from your agent (MCP)](#use-blazon-from-your-agent-mcp), [When not to use blazon](#when-not-to-use-blazon), [How it works](#how-it-works), [Plugins](#plugins), [Commands](#commands), [Configuration](#configuration), [Versioning and stability](#versioning-and-stability), [Security](#security), [Documentation](#documentation), [Contributing](#contributing).
|
|
18
16
|
|
|
19
17
|
## Quick start
|
|
20
18
|
|
|
21
|
-
Node 24 or later; macOS and Linux, and WSL on Windows is untried.
|
|
19
|
+
Node 24 or later; macOS and Linux, and WSL on Windows is untried. Install blazon in the folder that holds your brand, then run it:
|
|
22
20
|
|
|
23
21
|
```bash
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
npm run build # builds dist/, which bin/blazon.js runs
|
|
28
|
-
node bin/blazon.js init my-brand
|
|
29
|
-
node bin/blazon.js dev my-brand # the book, with live reload, at http://localhost:3000
|
|
22
|
+
npm install @iksnerd/blazon
|
|
23
|
+
npx blazon init my-brand
|
|
24
|
+
npx blazon dev my-brand # the book, with live reload, at http://localhost:3000
|
|
30
25
|
```
|
|
31
26
|
|
|
32
|
-
|
|
27
|
+
After the install, `npx blazon` runs the installed program. Without an install, write `npx @iksnerd/blazon` in its place, because `npx blazon` alone runs an unrelated package. The rest of this README writes `blazon` for either. To work on blazon itself from a clone, see [CONTRIBUTING](CONTRIBUTING.md#local-setup).
|
|
33
28
|
|
|
34
29
|
`blazon init` copies blazon's own brand book, [`examples/blazon/`](examples/blazon/), into the folder:
|
|
35
30
|
|
|
@@ -46,15 +41,15 @@ my-brand/
|
|
|
46
41
|
|
|
47
42
|
The book starts as blazon's brand and becomes yours as you replace it. `blazon check` notes every file that is still the starter's text, which is the list of what is left to do, and warns about each logo that is still blazon's own. To start from a company's site instead, run `blazon init acme-brand --from https://acme.com`: blazon reads the page and its stylesheets for colors, fonts and the logo, and flags each value `needs-review` until the brand owner confirms it ([how](docs/manual/01-getting-started.md#starting-from-a-live-site)).
|
|
48
43
|
|
|
49
|
-
To look at a finished book first, run blazon's own brand book
|
|
44
|
+
To look at a finished book first, clone the repository and run blazon's own brand book with no build: `npm run dev:blazon` ([CONTRIBUTING](CONTRIBUTING.md#local-setup)).
|
|
50
45
|
|
|
51
46
|
## Set up with your agent
|
|
52
47
|
|
|
53
|
-
Paste this into a coding agent (Claude Code, Codex, Cursor) in the folder where the brand should live.
|
|
48
|
+
Paste this into a coding agent (Claude Code, Codex, Cursor) in the folder where the brand should live. Give the agent your colors, fonts and logo, or a site address.
|
|
54
49
|
|
|
55
50
|
```text
|
|
56
|
-
Set up a blazon brand book here.
|
|
57
|
-
|
|
51
|
+
Set up a blazon brand book here. Install it with `npm install @iksnerd/blazon` (never run `npx blazon`
|
|
52
|
+
before that: the npm package named `blazon` is an unrelated project), then run it as `npx blazon`.
|
|
58
53
|
Run `blazon init brand` (add `--from <site url>` to read a site's colors, fonts and logo).
|
|
59
54
|
Read brand/AGENTS.md and follow it. Replace the starter's tokens, docs and assets with my brand:
|
|
60
55
|
<my colors, fonts and logo, or the site address>. Ask me for any color, font or license you
|
|
@@ -99,7 +94,7 @@ The same token is written as `--color-signal-orange: #FF5A1F;` in `theme.css` an
|
|
|
99
94
|
|
|
100
95
|
## When not to use blazon
|
|
101
96
|
|
|
102
|
-
- **You need a
|
|
97
|
+
- **You need a stable interface.** Blazon is 0.x: a minor version may break a stable surface, and the CHANGELOG lists it under "Breaking". Pin the version you build with ([chapter 15](docs/manual/15-maintaining-a-brand-book.md#pin-the-blazon-you-build-with)).
|
|
103
98
|
- **You need many output formats.** Blazon writes CSS, Tailwind v4, TypeScript and JSON, and the platform plugin writes Android, Swift and Kotlin for colors and dimensions only. [Style Dictionary](https://styledictionary.com) has a general system of custom transforms and formats.
|
|
104
99
|
- **You want rules enforced in a design tool.** Blazon reads token files in the repo and does not sync with Figma or Tokens Studio. A file exported from them works if it is DTCG 2025.10, but the `usage` roles and `tier` names are blazon's, so the editor will not enforce them.
|
|
105
100
|
- **You are on Windows.** It is tested on macOS and Linux with Node 24; WSL is untried.
|