refpages weekly downloads statistics
By lord-xld3 · npm · Webpack plugins
Reference pages for a TypeScript or JSDoc codebase, in the shape of a man page, built from its source files alone.
refpages has 28 recorded weekly downloads on npm, a decrease of 96.3% over the past 30 days, ranking #2922 of 3,247 tracked listings.
About refpages
refpages
Generates reference documentation for a TypeScript project, or a JavaScript project typed with JSDoc. Each export gets one page, laid out like a man page. Every page is built from the source code alone: its declaration, its types and the comments written above it.
There is no second place to write docs. A symbol is documented by commenting it where it's declared, so the pages can't fall behind the code. Links to things that no longer exist are reported as warnings. The output is plain static HTML with one stylesheet and no JavaScript.
- Install
- Quick start
- The command line
- Configuration
- Writing the docs
- Warnings
- What the pages show
- webpack
- From code
- Extensions
- Limits
- Developing refpages
Install
npm i -D refpages
refpages runs on Node 18 or later. It reads code with the TypeScript compiler API, which TypeScript 5.9 and 6 provide. If the project uses one of those versions, refpages shares its copy. Otherwise refpages installs its own, so a project on TypeScript 7 (whose compiler has no such API) still works, read by TypeScript 6.
Quick start
Add a refpages.json file to the project:
{
"title": "My library",
"entryPoints": ["src/index.ts"],
"exclude": ["src/internal"],
"out": "docs/reference"
}
Then run:
npx refpages
This writes one page for each export of src/index.ts, a page for each folder and file that declares one, and index.html, all into
docs/reference. Open index.html in a browser, or serve the folder with whatever serves the rest of the site.
The command line
refpages [config] [--out <dir>] [--strict | --watch]
| argument | |
|---|---|
config | The config file. By default, refpages uses refpages.json in the current folder, or the nearest one in a folder above it. |
--out <dir> | Where to write the pages, overriding the config's out. --out=<dir> works too. |
--strict | Exits with code 1 if there are any warnings. Use this in CI to keep the docs current. |
--watch | Keeps running, and writes the pages again whenever a file they're built from changes: a source file, the config or a config it inherits, or an extension. |
--version | Prints the version. |
--help | Prints usage. |
An option refpages doesn't recognize, a second config, or --strict with --watch is an error (exit code 2), not ignored.
refpages lists the files it wrote in .refpages-files in the output folder. On the next run, it deletes the ones it
no longer makes, such as the page for a removed export, and any folder that leaves empty. It never deletes a file
it didn't write, so the output folder can share space with the rest of a site. It refuses to write pages over its own inputs, such as a source file or the config.
Configuration
All configuration lives in one JSON file. Paths in it are relative to the file. entryPoints is the only
required key.
| key | default | |
|---|---|---|
entryPoints | The modules whose exports get pages. Each is a path, or {"path": "...", "label": "..."}. | |
title | "Reference" | The heading of the index and the title of every page. |
exclude | [] | Files to leave out. See Excluding files. |
root | the config's folder | The project's folder. Only files under it are documented, and not files in a node_modules folder below it. The index lists files by their path from here. |
tsconfig | none | The project's tsconfig.json. Without one, refpages also reads JavaScript files, typed by their JSDoc. |
out | "refpages-out" | Where the command line writes the pages. |
errorCalls | [] | Names of functions whose first string argument is an error message, such as ["fail"]. Every message a function passes to one of these is listed under that function's Errors section. |
extensions | [] | Modules that add to the pages. See Extensions. |
cache | true | Reading the code is most of a build, so refpages keeps what it read in the system's temp folder. It reuses that while no file it read has changed. Set this to false to read the code fresh every time. |
model | false | Set to true to also write model.json, which holds everything refpages read from the code. |
inherit | true | Set to false to stop this config inheriting from configs above it. |
A key refpages doesn't recognize, such as a typo, produces a warning.
Excluding files
A symbol declared in an excluded file gets no page, and the file gets no page of its own. That applies even when an
entry point re-exports the symbol. Each entry in exclude is either a path or a pattern:
"exclude": [
"src/internal",
"src/legacy.ts",
"/\\.generated\\.ts$/",
"/(^|\\/)__tests__\\//"
]
- A path, relative to the config file. A folder excludes everything inside it, and a file excludes only that file.
- A pattern: a regular expression written between slashes, with optional flags after the closing slash
(
/legacy/i). It is matched against each file's path relative toroot, with/between folders on every platform. Remember that each backslash must be doubled inside a JSON string.
Nested configs
A config inherits from any refpages.json in the folders above it. The search stops at the repository root (the
folder that contains .git), or at a config that sets "inherit": false.
Keys in the nearer config override the same keys in farther ones. Each key is replaced whole. Arrays are not
merged, so a nested "exclude": [] brings back every excluded file. Paths in an inherited config still resolve
relative to the file they were written in.…
Description from the npm listing.
- documentation
- typescript
- jsdoc
- reference
- api-docs
- man-page
- webpack-plugin
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (142)Similar npm Webpack plugins plugins
All 20 refpages alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/refpages. First seen Nov 9, 2026; last successful collection Dec 6, 2026. See the methodology.