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

@eluvio/elv-ramdoc

v0.3.4

Published

A customized version of the JSDoc template used by Ramda's API docs

Downloads

17

Readme

elv-ramdoc

This is a JSDoc template created by customizing the template used by Ramda's API documentation.

These are the major changes:

  • Added 'Show private' checkbox to filter
  • Added support for @curried tag
  • Changed HTML templating engine from handlebars to pug
  • Changed CSS templating engine from less to sass
  • Updated bootstrap to version 5.1.3
  • Enhanced filtering to also show/hide the detailed entries, not just the table of contents rows
  • Removed 'Open in REPL' / 'Run it here' links, as well as some tag sections we did not need (e.g.aka)
  • Made project name and GitHub links dynamic by retrieving info from package.json
  • Added Eluvio logo (linking to https://eluv.io) and favicon

Install

$ npm install --save-dev @eluvio/elv-ramdoc

Prerequisites and conventions

The following are assumed by this template and this README:

  • Your code is hosted on GitHub
  • Your project's repo has version tags (e.g.v0.0.1)
  • Your project's documentation is in top level directory docs
  • Your project has GitHub Pages enabled
    • Make sure your account or organization has GitHub Pages enabled
    • Configure GitHub Pages for your project
      • Go to your project's Settings → Pages screen
      • Under Source, pick the branch and the folder (/docs)
  • You have the following files at the top level of your repo:
    • README.md
    • .jsdoc.json (see below for sample)
    • package.json with the following attributes:
      • name
      • version
      • homepage set to the URL of your project's GitHub pages root
      • repository.url set to the URL of your project's GitHub repo

NOTE: You should put a link to the API documentation in your README.md file that connects to GitHub pages, e.g.:

## API Documentation

[https://eluv-io.github.io/elv-ramdoc/api.html](https://eluv-io.github.io/elv-ramdoc/api.html)

Example package.json fragment

Note that homepage is set to project GitHub Pages root, while repository.url points to the GitHub project page.

{
  "name": "@eluvio/elv-ramdoc",
  "version": "0.0.2",
  "homepage": "https://eluv-io.github.io/elv-ramdoc",
  "repository": {
    "type": "git",
    "url": "https://github.com/eluv-io/elv-ramdoc"
  }
}

Example .jsdoc.json file

Assumes the following:

  • Your .js files are in src/
  • Your documentation files are in docs/
  • You want to include items that have @private specified
{
  "tags": {
    "allowUnknownTags": ["category","curried","sig"],
    "dictionaries": ["jsdoc"]
  },
  "source": {
    "include": ["src"],
    "includePattern": ".js$",
    "excludePattern": "(node_modules/|docs)"
  },
  "plugins": [
    "plugins/markdown"
  ],
  "opts": {
    "destination": "./docs/",
    "encoding": "utf8",
    "pedantic": true,
    "private": true,
    "recurse": true,
    "template": "node_modules/@eluvio/elv-ramdoc"
  }
}

Usage (node.js)

In your projects package.json file add a new script:

"script": {
  "generate-docs": "jsdoc --readme README.md --configure .jsdoc.json"
}

Running this task with npm run generate-docs will generate your documentation.

If you would like to print the data being processed, set environment variable ELV_RAMDOC_DEBUG:

"script": {
  "generate-docs-debug": "export ELV_RAMDOC_DEBUG=1; jsdoc --readme README.md --configure .jsdoc.json"
}

In order for the GitHub source code links to work properly, you should rebuild and commit the docs with the npm version lifecycle hook, so that the docs will be rebuilt immediately after version number is bumped in package.json:

"script": {
  "version": "npm run generate-docs && git add docs && git commit -m 'Update docs'"
}

API Documentation

https://eluv-io.github.io/elv-ramdoc/api.html

License

MIT