Skip to content

Commit

Permalink
feat(typedoc-theme): Set up the initial customization
Browse files Browse the repository at this point in the history
marcmarine committed Dec 16, 2024
1 parent 04d6c21 commit 810b9c0
Showing 32 changed files with 2,247 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/red-tips-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"varvara-typedoc-theme": minor
---

Added initial setup for the Varvara TypeDoc Theme
Binary file modified bun.lockb
Binary file not shown.
46 changes: 46 additions & 0 deletions packages/typedoc-theme/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

# Caches

.cache

# Dependency directories

node_modules/

# TypeScript cache

*.tsbuildinfo

# Optional npm cache directory

.npm

# Optional eslint cache

.eslintcache

# Optional stylelint cache

.stylelintcache

# Output of 'npm pack'

*.tgz

# dotenv environment variable files

.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# Stores VSCode versions used for testing VSCode extensions

.vscode-test

# Finder (MacOS) folder config
.DS_Store

dist/
docs/
21 changes: 21 additions & 0 deletions packages/typedoc-theme/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Marc Mariné

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
64 changes: 64 additions & 0 deletions packages/typedoc-theme/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Varvara TypeDoc Theme

Varvara TypeDoc Theme is a [custom theme](https://typedoc.org/documents/Development.Custom_Themes.html) for TypeDoc, designed to provide an seamless documentation experience for TypeScript projects.

[![license](https://img.shields.io/github/license/marcmarine/varvara-js)](https://github.com/marcmarine/varvara-js/blob/main/LICENSE)

## Prerequisites

Ensure TypeDoc is [installed](https://typedoc.org/index.html#quick-start) in your project.

## Installation

Install the Varvara TypeDoc theme as a development dependency:

```bash
npm install varvara-typedoc-theme --save-dev
```

## Usage

### Method 1: Command-Line Interface (CLI)

Use the following command to generate documentation with the Varvara theme:

```bash
npx typedoc --plugin varvara-typedoc-theme --theme varvara
```

### Method 2: Configuration File

Create a `typedoc.js` configuration file in your project's root directory:

> [!NOTE]
> You can use various TypeDoc [configuration files](https://typedoc.org/documents/Options.Configuration.html) to customize your documentation generation.
```js
/** @type {Partial<import("typedoc").TypeDocOptions>} */
const config = {
// Specify the Varvara theme plugin
plugin: ['varvara-typedoc-theme'],

// Set the theme to Varvara
theme: 'varvara',

// Optional: Include version information
includeVersion: true

// Additional TypeDoc configuration options
// ... other options as needed
}

export default config
```

> [!IMPORTANT]
> The theme must be explicitly specified. If not set, the plugin will not be loaded by default.
## Contributing

Feel free to explore, test, and provide feedback. Your contribution is highly appreciated as we work towards improving and stabilizing the project.

## License

This project is licensed under the [MIT License](https://github.com/marcmarine/varvara-js/blob/main/LICENSE).
6 changes: 6 additions & 0 deletions packages/typedoc-theme/build.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
await Bun.build({
entrypoints: ['./src/index.tsx'],
outdir: './dist',
target: 'node',
packages: 'external'
})
Loading

0 comments on commit 810b9c0

Please sign in to comment.