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

rose-pine-jsdoc

v1.0.1

Published

Rosé Pine for JSDoc

Downloads

3

Readme

A fork of tidy-jsdoc that uses the Rosé Pine color palette.

Usage

With npm:

Add the dependency:

npm install --save-dev rose-pine-jsdoc

Then, in your jsdoc.json config, set the template property to ./node_modules/rose-pine-jsdoc.

Or:

You can copy this repository and set the static path to the template in your jsdoc.json file.

(See the example configuration)

Themes

| Rosé Pine Dawn | Rosé Pine | | ------------- | ------------- | | Rosé Pine Dawn (light mode) | Rosé Pine (dark mode) |

Features

Defaults

By default, this theme uses Inter for body text and Martian Mono for monospace. The layout is loosely inspired by the Rosé Pine website, but mostly keeps the form of the original tidy-jsdoc template.

Customization

You can overwrite most of the CSS variables by adding a style property in your jsdoc.json file. For example, if you were unhappy with the size of the header image, which by default is set to 80px, you could add a following property:

"styles": {
  "header-image-max-height": "100px"
}

This may not work with all CSS variables, or not cover a feature that you would like to change. In that case, I would recommend cloning the repository, customizing the source code, and then setting the static path to the modified template in the jsdoc.json file.

Example configuration

This is an example of a jsdoc.json configuration file.

{
  "tags": {
    "allowUnknownTags": true,
    "dictionaries": ["jsdoc", "closure"]
  },
  "source": {
    "include": ["src"],
    "includePattern": ".+\\.js(doc)?$",
    "excludePattern": "(^|\\/|\\\\)_"
  },
  "opts": {
    "template": "./rose-pine-jsdoc",
    "encoding": "utf8",
    "destination": "docs",
    "recurse": true
  },
  "plugins": ["plugins/markdown", "plugins/summarize"],
  "templates": {
    "cleverLinks": false,
    "monospaceLinks": false
  },
  "metadata": {
    "title": "Project Title",
    "logo": "./header-icon.png"
  },
  "styles": {
    "header-image-max-height": "100px"
  }
}

Generating documentation

Once you've configured JSDoc and added syntax to your JavaScript files, you can generate the HTML files like so. The readme file is optional, but it is rendered in the home page of the documentation.

jsdoc --readme README.md -c jsdoc.json

Typically you would add this to the scripts in your package.json, so that you could generate the documentation with npm run docs:

"scripts": {
  "docs": "jsdoc --readme README.md -c jsdoc.json"
}

Running the demo

The GitHub repository contains an example directory that renders an example output of this theme. It can be run with npm run demo.