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

@codewithkyle/dev-docs

v1.1.0

Published

Dev Docs is a simple markdown based documentation management tool.

Downloads

26

Readme

Dev Docs

Dev Docs is a simple markdown based documentation management tool. Simply create markdown files within the generated docs/ directory and run the docs command. No hassle, no fuss, just documentation in a minimalist style.

Features

  • Dynamically generated navigation structure
  • Group documents via directories
  • No configuration required
  • Light & dark theme

Installation

Install the npm packages

npm i -D @codewithkyle/dev-docs

Add the startup script to your package.json file

"docs": "docs"

Run the script

npm run docs

Flags

    -o --output     # Output as static HTML (optional)
    -c --cname      # CNAME file path (only required for static rendering)
    -f --favicon    # Favicon file path (optional)
    -p --port       # Set the documentation server port (optional, defaults to 5000)
    -s --src        # Location of the markdown files (optional, defaults to ./docs)

Writing Documentation

Create new documents by adding markdown files to the docs/ directory. You can group several documents under a custom header by placing the files together within a subdirectory.

External Navigation Links

Add custom external navigation links to the dynamically generated navigation structure (optional).

"docs": {
    "name": "Overwrite project name",
    "description": "Overwrite project description",
    "github": "https://github.com/",
    "npm": "https://npmjs.com/"
}

GitHub Actions Integration

Install the gh-pages package and create a nodejs.yml file within the .github/workflows/ directory.

name: Build and Deploy
on:
    push:
        branches:
            - master
jobs:
    build-and-deploy:
        runs-on: ubuntu-latest
        steps:
            - name: Checkout
              uses: actions/checkout@master

            - name: Setup Node and NPM
              uses: actions/setup-node@v1
              with:
                  node-version: 14.2.0

            - name: Install NPM Packages
              run: npm ci

            - name: Build
              run: npm run predeploy

            - name: Deploy
              run: npm run deploy
              env:
                  ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}

Create the NPM scripts:

"predeploy": "docs -o ./public -c ./CNAME",
"deploy": "node ./deploy.js"

Create the deploy.js script.

const ghPages = require("gh-pages");

const NAME = "Your Name";
const EMAIL = "Email";
const USERNAME = "github-username";
const PROJECT = "github-project-name";

ghPages.publish(
    "public",
    {
        user: {
            name: NAME,
            email: EMAIL,
        },
        repo: "https://" + process.env.ACCESS_TOKEN + "@github.com/" + USERNAME + "/" + PROJECT + ".git",
        silent: true,
    },
    (error) => {
        if (error) {
            console.log(error);
        }
    }
);

To finish adding GitHub Action automated deployment generate a personal access token and add it as a project secret named ACCESS_TOKEN

  1. Go to your GitHub profile settings
  2. Click on Developer Settings
  3. Click on Person Access Tokens
  4. Generate a new token with repo checked
  5. Copy token
  6. Go to project settings
  7. Click on Secrets
  8. Add a new secret named ACCESS_TOKEN