0.0.24 • Published 2 years ago
insvection v0.0.24
INSVECTION
Generate a documentation of your sveltekit component library from it's source files.
how to use
npx insvection init
npx insvection generate
output
interface Library{
name:string
version:string
description:string|null
components: [Component]
}
interface Component{
name: string
description: string|null
properties:[Property]
events:[Event]
slots:[Slot]
}
interface Property{
name: string
type: string|null
default: string|null
description:string|null
}
interface Event{
name: string
description:string|null
}
interface Slot{
name: string
description:string|null
}
add in file descriptions
Descriptions can be added via comments. Comments must begin in the same line as the property/event/slot/ they are describing.
<script lang="ts">
type integer = number
export let count:integer //@description{ set the initial value of the counter }
</script>
roadmap
- generate type / interface info
input
<script lang="ts">
type integer = number
type Options{
count:integer
}
<script>
**output**
```ts
interface Type{
name:string
attributes:[Attribute]
}
interface Attribute{
name: string
type: string
required:boolean
array:boolean
}
- generate markdown
generate either a json or markdown file / files