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

@spongex/docbuilder

v2.1.1

Published

Run document generators for multiple projects

Downloads

3

Readme

Docbuilder NodeJS Script

Run multiple document generators for multiple projects with one command simultaneously. Then merge them all into a single directory!

Performs command injection, use at your own risk! Please read documentation before use!

Requires the use of third party documentation generators such as Doxygen, JSDoc or Typedoc.

Install globally:

npm i -g @spongex/docbuilder

Or per-project as a dev-dependency:

npm i -D @spongex/docbuilder

Usage

Inside the directory you wish to generate the documentation in, create a .docbuilder.config.json file with the following format:

{
  "generators": {
      "doxygen": "doxygen .doxyfile",
      "jsdoc": "npx jdsoc index.js",
      "typedoc": "npx typedoc"
  },
  "jobs": [
    {
      "name": "wtengine",
      "generator": "doxygen",
      "path": "/home/matthew/Projects/wtengine",
      "checkfolder": "true"
    },
    {
      "name": "ppms",
      "generator": "doxygen",
      "path": "/home/matthew/Projects/ppms",
      "out": "ppms-docs",
      "checkfolder": "true"
    },
    {
      "name": "wtgui",
      "generator": "typedoc",
      "path": "/home/matthew/Projects/wtgui",
    }
  ],
  "output_folder": "public/docs"
}

It is recommended to set the document generators to output to a directory named docs/projectname for proper merger.

Then just run the script in the output directory:

npx docbuilder

A .docbuilder.log file will be created with the results of each job.

The script works by running each generator locally in the project's directory, then combining the results into the current working directory.

Generators

These are system commands used to launch each different document generator.

The following variables can be used:

  • $PROJECT - The name of the project
  • $PROJECT_LOCATION - The full path to the project
  • $OUTPUT_FOLDER - The name of the output directory from settings

Job Settings:

  • "name": "project-name" - Name of the project
  • "generator": "gen" - Which generator to use
  • "path": "project/path" - Full path to the project

Optional Global Settings:

  • "log_file": "filename" - Change the filename of the log file
  • "output_folder": "foldername" - Change the output directory name (default docs)
  • "nologging": "nologging" - Disable logging

Optional Job Settings:

  • "out": "out/folder" - Output folder created by generator
  • "checkfolder": "true" - Verify directory exists before generating docs
  • "removeold": "true" - Delete the old documentation directory after generation

Changelog

2.1.1

  • Improvements to README
  • Made out default to docs and optional

2.1.0

  • NOTE Changes in functionality that breaks previous versions
  • Various improvements to script functionality - see above
  • Dependencies bump

2.0.1

  • Bump packages and relocated project on GitHub