Repository navigation
feat!: named projects and transparent image aliases - #21
Merged
Merged
Conversation
…ghout
- Read all of LikeC4's ConfigFilenames: JSON5 for .likec4rc and the .json
names, bundle-require for likec4.config.{ts,mts,cts,js,mjs,cjs} with
likec4/config stubbed; `name` defaults to the folder name.
- Components read --likec4-* tokens into private --_likec4-* properties and
never declare them, so site overrides on any ancestor apply; tokens.test.ts
enforces it.
- .md fences: build-time project checks, title/collapsible/defaultOpen.
- Vite optimizeDeps check walks node_modules instead of createRequire, which
under Bun also sees Bun's global cache.
- test:site uses the long TEMP path so Vite's dev server finds its own
virtual scripts on Windows.
- astro.config.ts everywhere, .ts import specifiers, comments trimmed.
- README, wiki, skills, AGENTS.md and CHANGELOG updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
1.0.0-prerelease.6: LikeC4imageAliaseswork with no change to the project, projects can be named from anywhere, and a page picks a diagram by project, single file or fence./_astroc4/<project>/<path>, served from the original file inastro dev, copied into the build output, and rendered (SVGs inline, by LikeC4's own icons module).public/icons keep their public URL. Nofile://path reaches the client bundle for any icon.projects: { name: folder }(relative or absolute) compiles alongside the projects discovered under the site root, through junctions in.astro/astroc4/workspace(LikeC4 excludesnode_modules). Paths LikeC4 resolves lexically against the junction are mapped back to the real project folder, so aliases that climb out of the project (../../.assets/images) work.project/fileprops, andproject=/file=on fences.projectIdis a deprecated alias.project(or naming an unknown one) fails the build listing the names, instead of rendering the first project found.Test plan
node node_modules/vitest/vitest.mjs run— 190 passed, 2 skippedbun run check— 0 errors (playground andexamples/astro)bun run buildandbun run build:astrobun scripts/smoke.tsagainst the built playground — all checks pass, including the@alias icon of a project outside the site, its/_astroc4/URL (200,image/svg+xml), and nofile://inplayground/distastro dev: editingplayground-external/model.c4updates the open page without a restartNote
bun run test(Vitest under Bun) fails one pre-existing test on Windows, as onmain:plugin.test.ts › does not name a dependency the site cannot resolve— Bun'screateRequireresolvesreactfrom outside the temp site. It passes under Node. Recorded under Known in the CHANGELOG; not changed here.Publishing is left to the maintainer's release flow.