remarkablemark / typedoc-plugin-copy-code-to-clipboard

:clipboard: TypeDoc plugin copy code to clipboard

Home Page:https://b.remarkabl.org/typedoc-plugin-copy-code-to-clipboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Note: TypeDoc natively supports this in v0.24.5

typedoc-plugin-copy-code-to-clipboard

NPM

NPM version build

TypeDoc plugin that adds a button to copy code to clipboard for code blocks. See demo. Inspired by prototype.

Installation

NPM:

npm install typedoc-plugin-copy-code-to-clipboard --save-dev

Yarn:

yarn add typedoc-plugin-copy-code-to-clipboard --dev

TypeDoc automatically detected installed plugins. This plugin requires TypeDoc version ^0.23.

Configuration

Add the plugin to typedoc.json:

{
  "entryPoints": ["src"],
  "plugin": ["typedoc-plugin-copy-code-to-clipboard"]
}

Or specify the plugin when running the CLI command:

npx typedoc src --plugin typedoc-plugin-copy-code-to-clipboard

Development

Build the plugin:

npm run build # npm run build:watch

Generate the docs:

npm run docs

Open the docs:

open docs/index.html

Release

Release is automated with Release Please.

License

MIT

About

:clipboard: TypeDoc plugin copy code to clipboard

https://b.remarkabl.org/typedoc-plugin-copy-code-to-clipboard

License:MIT License


Languages

Language:TypeScript 83.7%Language:Shell 16.3%