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

docs2page

v0.0.3

Published

Automagic project websites

Downloads

9

Readme

docs2page - Automagic project websites

Docs2page automatically builds a web app to serve as your project website using information from your project's:

  • README.md file
  • package.json file
  • Code comments

Web apps produced by this package can be hosted on GitHub Pages or any other cheap hosting option since they require no server.

Note: This software is under construction and in pre-alpha state.

Prerequisites

Package file

Your package.json file should have the following fields maintained:

  • name
  • version
  • repository.url

Code comments

Docs2page expects to find your source code in the src folder of your project.

Docs2page generates the API page from output produced by the excellent documentation.js package - a jsdocs builder with a lot of smarts built in to intelligently and automatically infer many tags. documentation.js is particularly good for Flow projects since it can produce docs automatically from flow type annotations. Docs2page will install and run documentation.js for you but it is up to you to document your source code according to its easy to follow conventions.

Set up

  • npm install docs2page --save-dev
  • Include docs2page as a script your package.json file like this:
    "scripts": {
      ...
      "docs": "docs2page"
      ...
    }
  • Run npm run docs. Your project webpage will be created in the docs folder.

Icons and logos

Docs2page will create a default placeholder favicon and logo for you in the docs folder. You should replace these with custom files for your project. The two files are:

  • docs/logo.png

  • docs/favicon.ico

    All other content produced by this package in the docs folder will be automatically overwritten whenever the script is run but the above 2 files will be preserved.

Publishing

The many options for hosting and publishing your project website are beyond the scope of this document, however GitHub Pages provides an easy (automated) and cheap (free) service that will automatically update for you without requiring any extra steps. My personally prefered strategy is to publish from the /docs folder in the master branch.