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

jsdoc-wmf-theme

v1.1.0

Published

A template theme for JSDoc 4 inspired by the Wikimedia Design Style Guide

Downloads

26,091

Readme

JSDoc WMF theme

A theme for JSDoc 4 conforming to the Codex design system. Forked from the default template for JSDoc 3, which uses the Underscore Template library.

Example

See the EventLogging docs for a sample demo. :rocket:

Install

$ npm install --save jsdoc-wmf-theme

Usage

In your jsdoc.json file, add a template option.

"opts": {
  "template": "node_modules/jsdoc-wmf-theme"
}

To load the standard set of plugins, use:

"plugins": {
  "node_modules/jsdoc-wmf-theme/plugins/default"
}

Options

For information about options and plugins, see the wiki page.

Contributing

Contributions to the theme are welcome! See the JSDoc WMF theme board on Phabricator to view open tasks or open new tasks, bug reports, or requests.

Local development

These steps assume that you have Gerrit set up.

To set up a development environment, you'll need a repository that can generate JSDoc documentation, and this theme itself.

Initial setup

# Create a local folder
mkdir jsdoc-test
# Enter that new local folder
cd jsdoc-test

# Download a repository that uses JSDoc. Either MediaWiki core...
git clone ssh://[email protected]:29418/mediawiki/core
# ...or OOJS (or another repo of your choosing).
git clone ssh://[email protected]:29418/oojs/core

# Get the JSDoc theme
git clone --recurse-submodules ssh://[email protected]:29418/jsdoc/wmf-theme
cd wmf-theme
npm install
cd ..

Point to your local theme

In your local repository that uses JSDoc, edit the JSDoc config file (either jsdoc.json or .jsdoc.json):

  • Change the template to ../wmf-theme.
  • Change the plugins to point to ../wmf-theme. For example, for the default plugin set, use ../wmf-theme/plugins/default.

Edit defaultPlugins.json

In your local wmf-theme repository, edit defaultPlugins.json to point to the local plugins.

  • For theme plugins, replace node_modules/jsdoc-wmf-theme/ with ../wmf-theme/.
  • For third-party plugins, replace node_modules/ with ../wmf-theme/node_modules/.
  • JSDoc plugins (starting with plugins/) can remain unchanged.

Build and view your local docs

Build the docs in your test repo and view the generated site in the browser. E.g. for MediaWiki core, run npm run doc in the root of the core repository. Then find the full path to your local index.html file, e.g. file://path-to-local-mediawiki-core/docs/js/index.html, and open it in a browser.

Writing styles

This theme uses Codex design tokens for CSS values. View the Codex docs to see all of the tokens available for use as CSS custom properties.

Thanks

Thanks to:

License

Licensed under the Apache License, version 2.0.