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

documentation-theme-ecl

v1.1.2

Published

ECL theme for documentation.js

Downloads

32

Readme

ECL theme for documentation.js

This is a custom theme for documentation.js: it consists of underscore templates and a few assets: a highlight.js theme and the base of ECL

Example documentation theme based on ECL

Options

The theme is ready to accept the following options from your configuration:

  • project-name
  • project-description
  • project-url

Usage

CLI

Use the documentation.js CLI

Example:

$ npx documentation build **/_types/*.js --theme . -f html -o example/app

Where the --theme flag should point to the module (index.js) of the theme.

Node API

See the html generation script for an example of the formats.html method as pointed out in the documentation pages.

Theme development

Requirements:

  • Node.js current (8.x recommended)
  • yarn or npm

There are a few npm script tasks which you can use:

  • develop:assets
  • develop:theme
  • develop:server

Order is important, so it's recommended you start a separate terminal session for each task.

Develop assets

Takes care of CSS and JavaScript assets.

  • Makes use of webpack CLI.
  • Automatically discovers configuration from webpack.config.js
  • Bundles assets to assets/bundle
  • Watches for changes.

Develop theme

Takes care of templates.

  • Makes use of documentationjs CLI.
  • Takes input of glob patterns where documentation should be extracted from.
  • Builds HTML from underscore templates and moves images, favicon and bundle folders into a target dist folder. Thus, ensure that assets are bundled before they are moved.
  • Watches for changes

Develop server

Delivers results to the browser and reloads on changes.

  • Makes use of reload CLI.
  • Takes input of dist folder where develop:theme stores its results.
  • Can optionally listen to different ports if necessary.
  • Serves dist folder as a static site
  • Reloads when there are changes in dist folder.

Maintenance notes

Please commit the results of develop:assets in assets/bundle. This simplifies the workflow of publishing them to npm. Raw/Source styles and scripts in assets/js and assets/styles are ignored and not published to npm.