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

pinet

v1.1.5

Published

Yet another jsdocs template module

Downloads

31

Readme

Pinet

Yet another documentation template for jsdocs

JavaScript Style Guide

pinet

Install

npm i -D pinet

Custom Tags

Pinet comes with some custom tag support you can use, within your jsdoc config simply tell it to use pinets tags.js like so:

"plugins": [
    "node_modules/pinet/tags.js"
  ],

Currently category and sig/signatue tags are supported here. Feel free to open an issue to request other custom tags you may want to see!

Changelogs

You can also choose to have your changelog listed within the links of your documentation, simply provide the path to the changelog

"changelog": "./CHANGELOG.md",

Pinet will then go find, and parse the markdown into html to display on your site

See It In Action

You can check out kyanites documentation which is using the pinet templating engine to build its docs.

Check it out here: https://kyanite.dusty.codes/

Options

  • title - String: This is the title of the pages for your docs
  • genSources - Boolean: Set this to true if you want sources files to be generated and linked in your documentation
  • links - Array: An array of objects to add to the nav, each object needs a name and link property
  • lang - String: The value to set the lang attribute to on the html tag
  • customTags - Array: An array of strings which should be the tag names you want pinet to consider
  • meta - Array: An array of meta objects each object is built out into a meta element the properties provided will be turned into attributes

Example:

"pinet": {
  "title": "Testing -- Documentation",
  "links": [
    {
      "name": "Github",
      "link": "https://github.com/dhershman1/kyanite"
    }
  ],
  "genSources": true,
  "lang": "en",
  "changelog": "./CHANGELOG.md",
  "customTags": [
    "category",
    "signature"
  ],
  "meta": [
    {
      "name": "viewport",
      "content": "width=device-width, initial-scale=1.0"
    },
    {
      "charset": "UTF-8"
    }
  ]
}

Usage

Setup a jsdoc.json file with your options and settings. It is Highly recommended you provide not only the source folders for your js files but also a path to the readme and package.json so that small bits of information can be properly stored

Than use the jsdoc cli and point it to your config json:

node_modules/.bin/jsdoc -c jsdoc.json

This will generate a new set of files to give you html rendered documentation

Templating Engine

The actual engine behind Pinet, is importable for your own use as well. You can bring it in and use it to generate all kinds of html and functionality.

import { compile, p, text } from 'pinet'

compile('span', { data: 'testing' }, [
  p({}, [text('Hello!')])
]) // => <span data="testing"><p>Hello!</p></span>