@flareum/mcp 0.2.8 → 0.2.9
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/dist/first-pull.js +4 -1
- package/package.json +1 -1
- package/skill/SKILL.md +36 -0
package/dist/first-pull.js
CHANGED
|
@@ -39,8 +39,11 @@ export const firstPullReport = (outcome) => {
|
|
|
39
39
|
return `[flareum] could NOT pull the stylesheets into ${outcome.dir} — ${outcome.error}. `
|
|
40
40
|
+ 'The token tools still work; run `npx -p @flareum/mcp flareum pull` to retry.';
|
|
41
41
|
const { written, failed } = outcome.result;
|
|
42
|
+
// Naming the import is the difference between 24 files on disk and 24 files that apply: nothing
|
|
43
|
+
// loads them until the project's global stylesheet says so.
|
|
42
44
|
const head = `[flareum] no local stylesheets — pulled ${written.length} into ${outcome.dir}. `
|
|
43
|
-
+
|
|
45
|
+
+ `Import them once in your global stylesheet — \`@use '${outcome.dir.replace(/^src\//, './')}/main';\` `
|
|
46
|
+
+ '— then `npx -p @flareum/mcp flareum watch` keeps them current (FLAREUM_AUTO_PULL=off to stop).';
|
|
44
47
|
return failed.length ? `${head}\n[flareum] ${failed.length} could not be written: `
|
|
45
48
|
+ failed.map(({ path, reason }) => `${path} — ${reason}`).join('; ') : head;
|
|
46
49
|
};
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -31,6 +31,42 @@ page, and it is worth reading in full before the first line of code.
|
|
|
31
31
|
| Any text — a heading, a label, body copy, a pseudo-element's `content` | [references/typography.md](references/typography.md) |
|
|
32
32
|
| A token name, or judging one that already exists | [references/naming.md](references/naming.md) |
|
|
33
33
|
|
|
34
|
+
## Before the first token: check the stylesheets are imported
|
|
35
|
+
|
|
36
|
+
A token only resolves if the pulled stylesheets are actually loaded. `flareum pull` writes them into
|
|
37
|
+
the project — it does not wire them in, because which file is the global entry point is the
|
|
38
|
+
project's decision, not the tool's.
|
|
39
|
+
|
|
40
|
+
So the first time you use a token in a project, check the import exists, and add it if it does not.
|
|
41
|
+
Otherwise every `var([prefix]-…)` you write is correct and renders as nothing — the failure is
|
|
42
|
+
silent, and it looks like the token is wrong rather than absent.
|
|
43
|
+
|
|
44
|
+
**Find the pulled files** (`src/styles/flareum/`, or wherever `out` in `.flareum/config.json`
|
|
45
|
+
points), then **find the global stylesheet** — the one the app already loads for everything:
|
|
46
|
+
|
|
47
|
+
| Project | Usually |
|
|
48
|
+
|---|---|
|
|
49
|
+
| Angular | the `styles` entry in `angular.json` — commonly `src/styles.scss` |
|
|
50
|
+
| Vite / React / Vue | the CSS imported by the entry module — `src/main.tsx`, `src/index.css` |
|
|
51
|
+
| Next.js | `app/globals.css`, imported by the root layout |
|
|
52
|
+
| Plain | whatever the HTML `<link>`s |
|
|
53
|
+
|
|
54
|
+
Add the import at the **top**, before anything that uses a token:
|
|
55
|
+
|
|
56
|
+
```scss
|
|
57
|
+
@use './styles/flareum/main'; // SCSS
|
|
58
|
+
```
|
|
59
|
+
```css
|
|
60
|
+
@import './styles/flareum/main.css'; /* plain CSS */
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Then confirm it resolves — build, or grep the built CSS for a `--[prefix]-` declaration. A token
|
|
64
|
+
that is imported but still not applying is usually the `font:` shorthand or a missing
|
|
65
|
+
`--line-height`; [references/typography.md](references/typography.md) covers both.
|
|
66
|
+
|
|
67
|
+
If the pulled folder does not exist at all, the project has never pulled: say so and give the
|
|
68
|
+
command — `npx -p @flareum/mcp flareum pull` — rather than writing tokens that cannot resolve.
|
|
69
|
+
|
|
34
70
|
## Reading a search result
|
|
35
71
|
|
|
36
72
|
The header tells you which kind of answer you got, and they mean different things:
|