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

happydoc

v0.0.8

Published

happydoc --- convenient system that easy to create to make people easy to publish their documents

Downloads

21

Readme

happydoc

convenient system that easy to create to make people easy to publish their documents

Quick Start

Install

  • Server side(use go to install as a system command): go get -u github.com/maple-leaf/happydoc
  • Client side(install as npm package): npm i happydoc -D

PS: If you want, you can also use go to install at client side as a system wide command

Run happydoc server at your server

After you install happydoc on server, run command happydoc server to install happydoc service and run it

Publish document on client side

  • npm
    • init: npx happydoc init

    • publish: say you have docs folder in your project which contains documents generated by, say esdoc, and apidocs folder which contains server api documents generated by, say swagger. (both should have index.html inside)

      • use npx: npx happydoc publish docs -v 0.0.1 -t frontend
      • [TODO] use npm script: npm run happydoc apidocs
      // package.json
      {
      	...
      	scripts: {
      		'happydoc': 'happydoc publish'
      	}
      }

config file - .happydoc.json

{
	"project": "myAwesomeProject",
	"server": "http://127.0.0.1:8000",
	"account": "your account name at server",
	"token":
}

Commands

  • happydoc init

generate config file .happydoc.json by answer questions. If project has file package.json, project will default to name field inside it.

  • happydoc publish

upload documents to server. It receives one argument to indicate path to document folder, and has four flags: - server: shorthand s, will override value inside .happydoc.json if used - project: shorthand p, will override value inside .happydoc.json if used - version: shorthand v, current version of documents - type: shorthand t, type of documents

```bash
happydoc publish docs/fontend -v 1.2.0 -t frontend
happydoc publish docs/backend -v 1.2.0 -t backend -s http://my-doc-server.com -p myAwesomeProject2
```
  • happydoc server

init and run happydoc server. This server will receives documents uploaded by happdoc client with publish command. And token used by happdoc client is also generated on it.

This command will ask you:

  • folder to init server
  • which port should be used by server
  • password set for postgresql running on docker container, NOT DB ON YOUR HOST

Build and Release

  • release using goreleaser, release require github token with repo, check doc

    git tag version
    export GITHUB_TOKEN='Your Github Token Here'
    goreleaser goreleaser release
    
    # dry run without publish to github etc.
    goreleaser release --skip-publish
  • publish release to npm using go-npm: npm publish

This project use

TODO

  • better UI
  • use https
  • fix output for subcommand server