Skip to content

Commit 8b26669

Browse files
committed
feat(skill): Include source code in published bundle
Ship src/** in the npm tarball (excluding tests, stories, generated files) and document its location in doc/llms.md so LLMs can read the real component source as a complement to the docs and type defs. Refs WEB-2431
1 parent 522c305 commit 8b26669

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

doc/llms.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,30 @@ This file is the main entry point. All docs live at:
1515
If you cannot find a documentation file in `node_modules`, fetch the equivalent file from the GitHub
1616
repository at `https://github.com/Telefonica/mistica-web/blob/master/doc/<filename>`.
1717

18+
## Source code location
19+
20+
The full TypeScript/TSX source of this package is shipped inside the published tarball and is available
21+
alongside the compiled output and type definitions. Use it as a **complementary** reference whenever the docs
22+
or `.d.ts` files don't fully answer a question about a component's real behavior, props, or internals.
23+
24+
- **Installed package**: `node_modules/@telefonica/mistica/src/`
25+
- **GitHub fallback**: `https://github.com/Telefonica/mistica-web/tree/master/src`
26+
27+
What you'll find there:
28+
29+
- `src/**/*.tsx`, `src/**/*.ts` — production component source
30+
- `src/**/*.css.ts` — vanilla-extract style definitions
31+
- `src/index.tsx` and `src/community/index.tsx` — public entry points; start here to map an import to a file
32+
33+
Recommended lookup workflow:
34+
35+
1. Resolve the import path the consumer uses (e.g. `import {Button} from '@telefonica/mistica'` or
36+
`'@telefonica/mistica/community'`).
37+
2. Open `node_modules/@telefonica/mistica/src/index.tsx` (or `src/community/index.tsx`) to find which file the
38+
symbol is re-exported from.
39+
3. Read that source file (and its `*.css.ts` sibling, if any) for real props, types, default values, and
40+
behavior.
41+
1842
## Critical Rules
1943

2044
1. **NEVER hardcode colors in app/component UI code.** Always use `skinVars.colors.*` design tokens from

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@
1414
"dist-es/**",
1515
"css/**",
1616
"doc/**",
17+
"src/**",
18+
"!src/generated/**",
19+
"!src/**/__tests__/**",
20+
"!src/**/__acceptance_tests__/**",
21+
"!src/**/__screenshot_tests__/**",
22+
"!src/**/__type_tests__/**",
23+
"!src/**/__stories__/**",
24+
"!src/**/__private_stories__/**",
25+
"!src/**/*-test.ts",
26+
"!src/**/*-test.tsx",
27+
"!src/**/*-story.ts",
28+
"!src/**/*-story.tsx",
1729
"community.d.ts",
1830
"community.js"
1931
],

0 commit comments

Comments
 (0)