@likec4/core
Advanced tools
Changelog
0.41.0 (2023-10-25)
diagrams: relationship kinds by @MoBoo (#342)
Docs
Relationship kinds allow you to express different types of relations in a model and customize styling.
Example:
specification {
relationship async {
color amber
line dotted
head diamond
}
}
model {
service1 -[async]-> service2
}
cli: new CLI and preview mode
Try this in folder with your *.c4
files
npx likec4 serve
Documentation is updating... 👷
cli: export to static website
npx likec4 build -o dist
cli: Scaffold projects with npm create likec4
(ef7cf93)
diagrams: dashed relationships by default (3593d71)
@MoBoo made their first contribution in #374
Changelog
0.36.0 (2023-09-12)
Changelog
0.33.0 (2023-08-12)
We do not change major version yet, as the project is in active development.
This release includes breaking changes in @likec4/diagrams
:
With codegen
command, CLI generates structured data, like:
export const LikeC4Views = {
indexLR: {
title: 'Landscape View'
nodes: [/* ... */],
edges: [/* ... */],
},
cloud: {
title: 'Overview of Cloud'
nodes: [/* ... */],
edges: [/* ... */],
},
}
This data is used to draw views with @likec4/diagrams
react component.
import { LikeC4 } from '@likec4/diagrams'
import { LikeC4Views } from './generated-code'
// Creates components, bound to the data (with type checks).
// It ensures that only existing views can be rendered.
const { Diagram, Responsive, Embedded, Browser } = LikeC4.create(LikeC4Views)
export const IndexView = () => <Embedded viewId={'indexLR'} />
Documentaion (in progress)
./compute-view
(#267) (1945a97)