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

firedoc

v1.13.18

Published

[![Circle CI](https://circleci.com/gh/cocos-creator/firedoc/tree/master.svg?style=shield)](https://circleci.com/gh/cocos-creator/firedoc/tree/master)

Downloads

877

Readme

FireDoc

Circle CI

API Doc generator rewritten from YUIDoc. We use this tool to self-document firedoc itself at:

  • English: http://cocos-creator.github.io/firedoc/ or http://cocos-creator.github.io/firedoc/en
  • 中文: http://cocos-creator.github.io/firedoc/zh

NPM

Overview

FireDoc is forked and rewritten from YUIDoc and added some powerful enhanced features at Syntax Guide.

YUIDoc is a Node.js application used at build time to generate API documentation for JavaScript code. YUIDoc is comment-driven and supports a wide range of JavaScript coding styles. The output of YUIDoc is API documentation formatted as a set of HTML pages including information about methods, properties, custom events and inheritance for JavaScript objects.

YUIDoc was originally written for the YUI Project; it uses YUI JavaScript and CSS in the generated files and it supports common YUI conventions like Custom Events. That said, it can be used easily and productively on non-YUI code.

Installation

$ npm install -g firedoc

Usage

Usage: firedoc [options] [command]


Commands:

  build [path]    build document from the directory
  install [path]  install theme or plugin
  preview [path]  build and preview the document from directory
  help [cmd]      display help for [cmd]

Options:

  -h, --help     output usage information
  -V, --version  output the version number

Get Started

$ firedoc build <path> --lang <lang>

Or using a shortcut command:

$ firedoc <path> --lang <lang>

The following is the helper of firedoc-build(1):

  Usage: firedoc-build [options]

  Options:

    -h, --help            output usage information
    -l --lint             lint the parser
    --parse-only          only parse
    -H --http             build doc for web
    -M --markdown         generate markdown docs
    -T --theme <dir>      specify theme directory
    -D --dest <dir>       the destination folder to build
    -L --lang <language>  the i18n language
    -S --source           whether or not output source files and show the link in 'Defined in' section.
    -v --verbose          print all verbose information

--lang option is required for multi-language description. Currently firedoc supports en and zh language option. Adding those option will generate docs for that specific language.

--markdown or -M is optional flag, which lets you get the markdown-based documentation to directly host at Github or Bitbucket. Firedoc's github hosted documentation is generated by itself.

For sites that requires a base url (such as http://mysite.com/docs), specify a baseurl property in your yuidoc.json file:

{
  "name": "My Site",
  "baseurl": "/docs",
  "options": {
    "baseUrl": "",
    "outdir": "path/to/output",
    "linkNatives": true,
    "paths": [
        "path/to/my/src"
    ],
    "tabtospace": 4
  }
}

If you want to preview your api docs with local html files, add a

"local": "true"

to your config file.

Themes

By default the firedoc provides the following 3 themes:

  1. default the default theme of firedoc
  2. default(zh) the Chinese version of default
  3. markdown the default markdown theme for firedoc

Specify a theme locally

firedoc build <path> --theme [path/to/your/theme]

Install a theme remotely

Firedoc supports that you can install a theme from Github, Bitbucket or any other valid url.

$ firedoc install notab
$ firedoc install firedoc-theme-notab
$ firedoc install https://github.com/fireball-x/firedoc-theme-notab

The above command will install the theme firedoc-theme-notab into installed firedoc directory in your machine. Then you would be able to use the theme just like this:

$ firedoc build <path> --theme notab

However if the remote url has a same basename with what you have installed in your machine, then you can specify a different name to install it:

$ firedoc install <url> --name different-theme-name

If you are wanting to write a new theme and need some details, you could go to: themes README.

Note: please make sure you have the installed following dependencies before using theme functionality:

  • Node.js or IO.js which supports:
    • Template string
    • Synchronous child_prcess spawn
  • git command-line tool

Test

To run test

$ npm test

Documentation

Contributing

Please see the CONTRIBUTING.md.

License

This software is free to use under the Yahoo Inc. BSD license. See the LICENSE file for license text and copyright information.