npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

typedocinc

v1.0.9

Published

Includes files in documentation generated with typedoc

Downloads

3

Readme

typedocinc

Insert files content in documentation pages generated with typedoc.

With this tool, API documentation writers will insert their own content before and after the original content of a typedoc-generated documentation. For every .html file in the original documentation, the tool creates the <basename>_before.md and <basename>_after.md files. Next, the documentation writer adds content in these files. Finally, the tool merges the original documentation and the before and after files, and saves the new documentation.

Install

Install typedocinc as global:

npm i typedocinc -g

Check it works:

typedocinc -h
Usage: typedocin [options] [command]

Includes files in documentation generated with typedoc

Options:
  -V, --version                output the version number
  -v, --verbose                show detail messages during execution. (default: false)
  -h, --help                   display help for command

Commands:
  prepare|p [options] <path>   prepare original documentation in <path> by creating its before and after files
  build|b [options] <path>     enhance original documentation in <path> by mergind before and after files in the original documentation.    
  generate|g [options] <path>  prepare before and after files, enhance original documentation in <path> by mergind before and after files   
                               in the original documentation.
  help [command]               display help for command

Usage

typedocinc build original --includes original_includes --target original_modified

Build a modified documentation version in original_modified. Merge the original documentation in original folder with custom content in original_includes folder.

The original_includes folder contains the files with the content you want to include either before (_before) or after (_after) the API documentation text in the original.

For example, you want to include your custom text before API text in original/index.html. To this end, you will create the original_includes/index_before.md file. To include your custom text after the API text in original/index.html, you will create the original_includes/index_after.md

In original_includes/index_before.md:


## Hello World!

Welcome to our software product API documentation. You can find as at [FintechOS](http://fintechos.com). Use Markdown notation to quickly add content such as paragraphs, headers, tables, links, bullet and item lists.

In original_includes/index_after.md:


## Awesome, right?

We encourage you to contact us with your questions, comments and suggestions. Please feel free to contact our visit our [Community](http://community.fintechos.com).
typedocinc prepare original --includes original_includes
typedocinc prepare original --includes original_includes --clear

Getting help

Get basic help information

// short option name
typedocinc -h

// or the long option name
typedocinc --help

// or the help command
typedocinc help [command]

Get help for prepare | p command

typedocinc help prepare
Usage: typedocin prepare|p [options] <path>

prepare original documentation in <path> by creating its before and after files

Options:
  -i, --includes <path>         Path where before and after files will be created.
  -c, --clear                   Override before and after files (default: false)
  -d, --defaultIncludes <path>  Path to file with default content for includes files
  -b, --beforeIncludes <path>   Path to file with default before content for includes files
  -a, --afterIncludes <path>    Path to file with default after content for includes files
  -h, --help                    display help for command

Get help for build | b command

typedocinc help build
Usage: typedocin build|b [options] <path>

enhance original documentation in <path> by mergind before and after files in the original documentation.

Options:
  -i, --includes <path>  Path where before and after files already exist.
  -t, --target <path>    Path where enhanced documentation is saved into.
  -h, --help             display help for command

Get help for generate | g command

typedocinc help generate
Usage: typedocin generate|g [options] <path>


prepare before and after files, enhance original documentation in <path> by mergind before and after files in the original documentation.   

Options:
  -i, --includes <path>         Path where before and after files already exist.
  -t, --target <path>           Path where enhanced documentation is saved into.
  -c, --clear                   Override before and after files (default: false)
  -d, --defaultIncludes <path>  Path to file with default content for includes files
  -b, --beforeIncludes <path>   Path to file with default before content for includes files
  -a, --afterIncludes <path>    Path to file with default after content for includes files
  -h, --help                    display help for command

More info

For more information and examples, visit Typedocinc Documentation.

Functions

createIncludes(source, includes, options)

Create includes files for an original typedoc documentation.

Kind: global function

| Param | Type | Description | | -------- | ------------------- | ------------------------------------------------------------------------------------- | | source | string | Path of source (original) documentation. | | includes | string | Path to includes folder. Create before and after includes files for each source file. | | options | object | Object with key-value pairs |

buildIncludes(source, includes, destination, options)

Merge includes files into original documentation.

Creates a copy of the source documentation containing the includes file for each source file as indicated in the specified folder. Saves resulting documentation in provided folder.

Kind: global function

| Param | Type | Description | | ----------- | ------------------- | ------------------------------------------------------------------ | | source | string | Path to source documentation. | | includes | string | Path to folder with includes files. | | destination | string | Path to resulting documentation, with original and includes files. | | options | object | Object with options for building files. |

getDefaultIncludesContent(options) ⇒ string | undefined

Load default includes files as specified in provided keys.

Kind: global function
Returns: string | undefined - If file exists, the content of the file, or undefined otherwise.

| Param | Type | Description | | ------- | ------------------- | ----------------------------------------------------------------------------------------------------------------- | | options | object | Object whose keys are role for files and values are filenames {'beforeIncludes: 'path/to/file/to/include/before'} |