Skip to content

Commit

Permalink
Add more symbol docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vrugtehagel committed Jul 16, 2024
1 parent 43d14f8 commit 223a956
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vrugtehagel/eleventy-document-outline",
"version": "0.1.3",
"version": "0.1.4",
"exports": "./mod.ts",
"publish": {
"include": ["src/**", "mod.ts", "README.md"]
Expand Down
7 changes: 7 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ function RenderPluginForEleventyDocumentOutline(config: EleventyConfig) {
});
}

/** The main plugin. Add this with `eleventyConfig.addPlugin(…);` Options are
* all optional - see the `EleventyDocumentOutlineOptions` type for more
* information. */
export function EleventyDocumentOutline(
config: EleventyConfig,
options: EleventyDocumentOutlineOptions = {},
Expand Down Expand Up @@ -145,6 +148,10 @@ export function EleventyDocumentOutline(
return result;
});

/** This may not run if the build fails for some reason or another, but it
* should be okay since we use the same `tmpDir` on subsequent runs. In other
* words, the next successful run will delete the temporary directory
* properly. */
config.events.addListener("eleventy.after", async () => {
await fs.rm(tmpDir, { recursive: true, force: true });
});
Expand Down

0 comments on commit 223a956

Please sign in to comment.