Skip to content

Commit

Permalink
feat(doc): implement a HTML documentation generator
Browse files Browse the repository at this point in the history
A new generator that doesn't create implementations for a language, but
instead creates HTML documentation for a schema.

This is the first building block to provide a new CLI command that can
generate the documentation for any schema, similar to how rustdoc can
generate local documentation for Rust files or projects.
  • Loading branch information
dnaka91 committed Dec 21, 2023
1 parent 3b9e342 commit b72ba33
Show file tree
Hide file tree
Showing 65 changed files with 11,230 additions and 215 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.{json,yaml,yml}]
[*.{html,js,json,yaml,yml}]
indent_size = 2

[Justfile]
Expand Down
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
{
"editor.quickSuggestions": {
"other": "on",
"strings": "on"
},
"files.associations": {
"**/templates/**/*.html": "jinja-html",
"*.css": "tailwindcss"
},
"tailwindCSS.includeLanguages": {
"jinja-html": "html"
}
}
223 changes: 223 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ missing_docs = "warn"
[workspace.lints.clippy]
all = "deny"
pedantic = "warn"
clone_on_ref_ptr = "warn"

[workspace.dependencies]
clap = { version = "4.4.11", features = ["derive", "wrap_help"] }
Expand Down
2 changes: 1 addition & 1 deletion book/highlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"devDependencies": {
"@biomejs/biome": "^1.4.1",
"esbuild": "^0.19.9"
"esbuild": "^0.19.10"
}
}
Binary file modified bun.lockb
Binary file not shown.
6 changes: 5 additions & 1 deletion crates/stef-build/src/definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ fn compile_const(
}
}

fn compile_import(Import { segments, element }: &Import<'_>) -> TokenStream {
fn compile_import(
Import {
segments, element, ..
}: &Import<'_>,
) -> TokenStream {
let segments = segments.iter().enumerate().map(|(i, segment)| {
let segment = Ident::new(segment.get(), Span::call_site());
if i > 0 {
Expand Down
Loading

0 comments on commit b72ba33

Please sign in to comment.