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

modern-jsdoc-template

v1.0.0

Published

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

Downloads

59

Readme

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 template|Modern JSDoc template| |---|---|---| |Publish Script|publish.js|publish.js (no changes, same as in JSDoc default template)| |Code syntax highlighter script|prettify.js(self-hosted)|highlight.js (CDN)| |Code line numbers script|linenumber.js (self-hosted)|highlightjs-line-numbers.js (CDN)| |General CSS styling|JSDoc default|Dark/Light theme (similar to GitHub)| |Code syntax highlighter styles|JSDoc prettify.js theme|Dark/Light theme (similar to GitHub)| |Layout Template|JSDoc default layout |JSDoc default layout with some modifications to add scripts and styles| |All others templates|JSDoc default|Same as in JSDoc default, no changes! |Fonts|OpenSans (external)|system fonts| |Table of contents|no|yes|

Quick start

  1. Install jsdoc
npm install --save-dev jsdoc
  1. Install modern-jsdoc-template
npm install --save-dev modern-jsdoc-template
  1. 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
  }
}
  1. Generate documentation
npx jsdoc -c jsdoc.json

Contributing

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

Thanks