You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

modern-jsdoc-template

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modern-jsdoc-template

Modern JSDoc default template with a Dark/Light theme style that closely resembles the Dark/Light theme found on GitHub

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
20
81.82%
Maintainers
1
Weekly downloads
 
Created
Source

Modern JSDoc default template

Modern JSDoc default template with a Dark/Light theme style that closely resembles the Dark/Light theme found on GitHub

Run tests node-current JavaScript Style Guide JSDoc

Demo

screenshot

Table of contents

Why?

Dark/Light theme

This template enhances the simple and minimalistic JSDoc default template by incorporating a dark and light theme styling, similar to GitHub's dark dimmed and light theme. There are no other significant alterations.

Goal

Minimal changes to the default theme.

The JSDoc default theme has undergone minimal changes. The template only includes new styles and slight external script additions to the JSDoc default template. The main functionality and features remain unchanged. During the build process, most of the templates are copied from JSDoc without any modifications, ensuring alignment with the JSDoc default template in terms of features and functionality.

Features:

  • Dark/Light theme similar to GitHub light and dark dimmed themes
  • Highlight.js as a code syntax highlighter instead of prettify.js
  • Table of contents based on tocbot.js
  • initial.css as a base root CSS styling

Comparison Table

JSDoc default templateModern JSDoc template
Publish Scriptpublish.jspublish.js (no changes, same as in JSDoc default template)
Code syntax highlighter scriptprettify.js(self-hosted)highlight.js (CDN)
Code line numbers scriptlinenumber.js (self-hosted)highlightjs-line-numbers.js (CDN)
General CSS stylingJSDoc defaultDark/Light theme (similar to GitHub)
Code syntax highlighter stylesJSDoc prettify.js themeDark/Light theme (similar to GitHub)
Layout TemplateJSDoc default layoutJSDoc default layout with some modifications to add scripts and styles
All others templatesJSDoc defaultSame as in JSDoc default, no changes!
FontsOpenSans (external)system fonts
Table of contentsnoyes

Quick start

  • Install jsdoc
npm install --save-dev jsdoc
  • Install modern-jsdoc-template
npm install --save-dev modern-jsdoc-template
  • Specify a source and template in jsdoc.json
{
  "plugins": ["plugins/markdown"],
  "source": {
    "include": ["source???/"]
  },
  "templates": {
    "cleverLinks": true,
    "default": {
      "includeDate": false
    }
  },
  "opts": {
    "template": "node_modules/modern-jsdoc-template/default",
    "readme": "./README.md",
    "destination": "./docs/",
    "recurse": true,
    "verbose": true
  },
  "markdown": {
    "idInHeadings": true
  }
}
  • Generate documentation
npx jsdoc -c jsdoc.json

Contributing

  • Clone/fork the repository and run npm install to install dependencies.
  • Run npm start to start the development server with watcher.
  • Add your changes to src/* files and test the result in browser on http://localhost:8082
  • Run npm test to run tests.
  • Commit your changes and create a pull request.

Thanks

Keywords

jsdoc

FAQs

Package last updated on 10 Jun 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