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

scrybe

v2.0.14

Published

Automated documentation creation tool

Downloads

11

Readme

Scrybe

Auto documentation tool designed for use in javascript libraries, creating a documentation website. This webpage has built in mobile support, search bar, and darkmode. There is also built in support for ECS.

It is similar to JSDoc, but was created for use for a multi-file library. A knowledge of HTML could be helpful as it takes the descriptions directy into HTML files.

Download Scrybe

Install via npm:

npm install scrybe

Usage

$ node scrybe

This will print out to the console the files used, as well as a color coded tree of the library printed.
These types will be described later

  • green = object
  • yellow = class
  • cyan = method
  • blue = property
  • purple = options

Arguments

-f or -file

Points Scrybe to header file

-p or -print

Location to put the created documentation HTML files

HTML manipulation of descriptions

For examle, <a> or <img> tags could be used to enhance the descriptions. Properties that this works with are denoted by Supports HTML manipulation in the description.
For code, you can use <span class="code"></span>. There are also some built in color classes (based on the monokai color scheme) which are used in the rest of the page:

  • red
  • orange
  • yellow
  • green
  • blue
  • purple
  • white

API

Example:

/*
* @name example
* @type method
* @description this is the description of the example method
* @param {ex}{String}{example description of parameter}
*/

All of scrybe code should be within a multiline comment like shown above. Multiple scrybe entities can be within one multiline comment.

@name

Required

Name of the entity.

@type

Required

Type of the entity.

  • obj / object
  • method
  • prop / property
  • class
  • return
  • head
  • options
  • config
  • entity
  • component
  • environment

The head type is used for the library description. It should be the first scrybe command in the file given with the -f or -file command.
The return type is used for classes that can only be created by the user with a function rather than with the new keyword.
The options type is used if the parameter needs to have it's options described. For example, a config object. An options type can have @param or @option (described later), but not both types at the same time.
The entity and component types are used for classes that are ECS based, such as using a library like OCS.

@description

Supports HTML manipulation
Description of the entity.

@param

Describes a parameter of the entity
Supports HTML manipulation

/*
@param {name of parameter}{type of parameter}{description of parameter}
*/

Optionally, you can have a fourth command: parameter default. This will have automatic stylization (described below);

/*
@param {name of parameter}{type of parameter}{description of parameter}{parameter default}
*/

@option

Unique to the options type. Describes a parameter option
Supports HTML manipulation

/*
@option {parameter option}{description of parameter option}
*/

@parent

Gives the parent of the entity. For example, if this were the code:

parent = {
	child: {
		grandchild: ()=>{}
	}
}

The child would have the parent:

/*
* @parent parent
*/

The grandchild would have the parent:

/*
* @parent parent.child
*/

The parenting is only in relative to the that file. If it isn't in the header file as it was past over by @path (see next), the pathed entity is automatically added.
If you have a scrybe command that calls a parent, that parent command must be earlier.

@path

Tells Scrybe that there are children of this object are located in the file at this path. Automatically adds this entity and the parents of this entity as parents to all scrybe commands in the the following file. You can still add parents to scrybe commands.

@proto

Used specifically for a type property, and is used to describe the propery type.

@component

Used to add a component to a type entity.

types

When describing types for properties, parameters, etc. there are some built in types that will have automatic stylization:

  • Int
  • Number
  • String
  • Function
  • Object
  • Boolean

You do not have to use the types given, and can use your own and it Supports HTML manipulation.
A comma (without spaces) can be used to have multiple types.
Placing [] around the type will denote an array with automatic stylization.

When describing default values, stylization will be automatically added if it matches one of the above built in types.
Placing "" or '' around the value will denote a string.