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

repodoc

v0.0.19

Published

creates a overview site for a monorepo

Downloads

87

Readme

Repodoc

Repodoc creates an app index in html for a (n angular) monorepo/multiapp project with

  • link to apps' documentation
  • brief description of the apps

Assembles docs of all apps (, if desired).

Graphic: Tasks

Features

Repodoc

  • finds the apps of a monorepo and their details within the angular.json of monorepo
  • extracts the text of the chapter "Overview" (or another chapter) of the readme.md of each app
  • copies the app's docs (if desired)
  • creates an html file based on a handlebars template with a list of all apps containing
    • a link to app's docs (either copied docs or original docs)
    • app's brief description (based its readme.md, there the text of the chapter 'Project Purpose')

Installation

npm install repodoc -g

Usage / CLI

Prerequists

Repodoc works on a repository with a structure of standard angular multi projects repository. For building the app index Repodoc uses a template file.

So, for getting Repodoc to run you need at least

  • a repository directory with multi projects (a projects file like angular.json and a directory 'projects' containing the projects) and

  • a handlebars template file

Quick Start

Repodoc comes with test data

  • The directory 'example' is a real angular multi project repository (unneeded directories and files has been stripped) The repository contains three projects: app01, app02 and app03. app01 and app03 have docs, but not app02.

  • The directory 'template' contains a template file "index.hbs"

For the first trial copy theses two directories into the directory you will start Repodoc from.

Start repodoc just by entering

repodoc

Graphic: Quick Start

Commit all parameters without any change.

Repodoc will show following messages:

using default parameters due to cannot read file repodoc.json due to ENOENT: no such file or directory, open '<working directory>\repodoc\repodoc.json'
example\projects\app02\compodoc does not exits
html file saved to repodoc\index.html

"using default parameters due to ..." appears the first time Repodoc runs. The first run creates the config file. So, further runs find the config file and the warning will not appear anymore.

"example\projects\app02\compodoc does not exits" informs about the missing docs of app02.

The index.html contains a list of the three apps with

  • reference to their docs (only for app01 and app03 due to missing docs of app02)
  • a brief description ("purpose")
  • further details (from angular.json of the repo)

Options

By default Repodoc uses a config file named repodoc.json. The config file contains the parameters of Repodoc's last run. You can alter the name of the config file by starting Repodoc with option "--configFile=<config file name> resp. -c <config file name> .

By default Repodoc provides the possibility to change the parameters (--askParams=true is default). With option --askParams=false you can skip the dialog part of the program start. Then, Repodoc uses either the config file values (if config file is available) or the default values.

By default Repodoc copies the doc's directories of the apps to the output directory where you find the generated index.html. (--copyProjectsDocs=true is default) With option --copyProjectsDocs=false you can omit the copying. Then, the apps' entries gonna point to the genuine docs of the apps.

All directory, file and other parameters can be set as options. In detail:

  • repoDir: path to mono repo, needs to be an existant directory (default: example)
  • projectsFile: name of the file which contains the JSON object 'projects' (see structure of angular.json of a mono repo) (default: angular.json)
  • projectsDocsDir: path to app's docs directory, needs to be an existant directory (default: compodoc)
  • projectsDescriptionTitle: title of the chapter the brief description of the apps will be extracted from (default: Overview)
  • templatesDir: template file(s) directory, needs to be an existant directory (default: templates)
  • templateFile: template file name for creating output file, needs to be an existant file (default: index.hbs)
  • outputDir: path to output directory for summarized documentation, needs to be a valid directory name, will be created if not exist (default: repodoc)
  • outputFile: name of the landing page file of summarized documentation, needs to be a valid file name (default: index.html)

API

Module doc does the work.

Module config handles the parameters doc needs.

For further informations refer to Repodoc's documentation located at docs/html (static html).

References

The documentation of the sample apps is generated with compodoc. The great documenation generator for Angular projects which inspired me to implement Repodoc.

The Repodoc's documentation is generated with TYPEDOC, a super got-to-the-point tool.