New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@knodes/typedoc-plugin-code-blocks

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@knodes/typedoc-plugin-code-blocks

A TypeDoc plugin to embed source code into your output documentation

latest
Source
npmnpm
Version
0.23.4
Version published
Weekly downloads
98
-28.99%
Maintainers
1
Weekly downloads
 
Created
Source

@knodes/typedoc-plugin-code-blocks

A TypeDoc plugin to embed source code into your output documentation

npm version npm downloads Compatible with TypeDoc

CircleCI Code Climate coverage Code Climate maintainability

For more infos, please refer to the documentation

Features

  • 🔗 Source hyperlinks
  • 🎨 Compatible with the default theme
  • 📁 Monorepo support
  • 🎯 Locate invalid markups

Usage

In the source code you want to use as code blocks, delimitate regions. Regions are started with // #region my-name, & ended with // #endregion [my-name]. Interleaved/nested regions are supported. Regions must only contain [a-zA-Z0-9-_.].

In any markdown content, (in README, pages, or doc comments), use the {@codeblock ...} & {@inlineCodeblock ...} tags to use code blocks.

Reference a file

Syntax:

{@codeblock <path-to-file>[#region] [mode] [ | custom-file-name]}
  • <path-to-file>: A path to the code file to embed. Checkout this documentation page for more infos on the syntax of the path for monorepo configuration.

    Note that the path must not contain any of the following characters: #|

  • [#<region>]: A region selector in the target file. The <region> parameter can be a glob pattern, or a list of block names/patterns separated by a +. See minimatch for details on supported patterns.

    Note that region markers are not outputted in the generated code block.

  • [mode]: optional. Can be any valid {@link EBlockMode}, to override the default settings.
  • [ | custom-file-name]: allow to specify an explicit file name to display in the code block header.

{@codeblock ...} are by default looked up into your workspace examples folder, but you can customize it by using the source option

Wrap standard markdown content

Syntax:

{@inlineCodeblock <custom-file-name> [mode] ```
....
```}
  • <custom-file-name>: The file name to set in the header
  • [mode]: optional. Can be any valid {@link EBlockMode}, to override the default settings.

Configuration

For more information on configuration, please refer to the options documentation page

Quick start

npm install --save-dev @knodes/typedoc-plugin-code-blocks typedoc@^0.23.0

Compatibility

This plugin version should match TypeDoc ^0.23.0 for compatibility.

Note: this plugin version was released by testing against ^0.23.28.

Keywords

code

FAQs

Package last updated on 08 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts