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

@vcl/doc-gen

v0.4.6

Published

VCL Documentation Generator

Downloads

31

Readme

VCL Documentation Generator

A documentation generator for the VCL based on a set of modules or an entry point package.json and its recursive dependencies. In most cases you want the doc-gen to use a single package.json listing all dependencies from your project. The output will look like the VCL's module browser.

Under the Hood

The main purpose of this module is to generate a JSON data structure in which all information is held. Modules considered need to have a vcl property in the package.json file according to the structure explained here.

Each module's documentation file (default is README.md) is picked and copied into the JSON structure as well as the meta data from package.json.

The JSON data is rendered into a browsable documentation based on HTML by the vcl-doc-client module.

Usage

CLI

npm -g i @vcl/doc-gen
cd someProject
vcl-doc-gen --entry ./package.json --output doc.html

Arguments

All arguments are optional.

Option | Default | Description --- | --- | --- --name | VCL Documentation | Browser Title & Main heading --output | vcl-documentation.html| Output HTML file --entry | ./package.json | Entry file. --basePath| current working dir |

See Options for a more detailed description.

Local CLI

npm install --save-dev @vcl/doc-gen
./node_modules/.bin/vcl-doc-gen

Generate HTML

var docGenerator = require('@vcl/doc-gen');

docGenerator.generateHtml({
  name: 'VCL Documentation',
  entryPackage: './package.json',
  output: './documentation.html'
});

Generate JSON

var docGenerator = require('@vcl/doc-gen');

docGenerator.generate({
  name: 'VCL Documentation',
  entryPackage: './package.json',
  output: './doc.json'
});

Options

name

The name of the documentation. When using vcl-doc-client this will be displayed in the header and set as the page title.

Default: name: 'VCL Documentation'

entryPackage

The package that the doc-gen should parse to find all VCL dependencies and generate the documentation from.

Example: entryPackage: './package.json'

packages

You can put a list of paths to additional packages here or use this as an alternative to the entryPackage option and set your packages manually.

Example: packages: ['../vcl-test', './some/package']

output

The file to output the finished JSON doc.

Default: output: './doc.json'

removeTopHeading

With this option, all level 1 headings from the package readme files are removed. Defaults to true, because most packages have the package name as the first heading and the vcl-doc-client does already display the package name above the readme.

Default: removeTopHeading: true

basePath

The base path.

Example: basePath: './my-project'