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

node-offline-api

v0.12.0

Published

Node API Document Creator

Downloads

4

Readme

Node.js offline document API

npm version Commitizen friendly Build Status codecov dependencies

The Node.js Offline Document API (NODe API) module allows anyone to create an offline version of the Node.js documentation for any version of Node.js.

Requirements

While you can create documentation for any version of Node.js, this module has been created versions greater than 4.0.0 in mind. Since it has been created with ES5 for compatibility, older versions will work, but it has not been tested or created to support these older versions.

Installation

You can clone this repository, or install via NPM.

Via Source

$ git clone https://github.com/3DEsprit/node-offline-api.git

$ npm i 

Via NPM

$ npm i node-offline-api

or

$ yarn add node-offline-api

Usage

There are two different ways to use the NODe API, through the CLI, and as an added module to your Node.js applications.

As a module in your JavaScript code

To use the NODe API in your own code, all that is needed is to require the module's createDoc method, and call it.

var createDocs = require('node-offline-api').createDocs;

createDocs();

Run the createDocs method will build the documents to the buildDir in the folder buildName based on the default buildVersion. By default the build directory is in the root of the running environment directory, with the build folder name of node-documents with the version set to match the version of node running the method.

If you need to change the desired build directory, build folder name, or build version you can change the buildOptions object to do exactly this.

var buildOptions = require('node-offline-api').buildOptions;

buildOptions.buildDir = '/Users/username/Documents';
buildOptions.buildName = 'MyAPIDocs';
buildOptions.version = '4.4.0';

createDocs();

The way that NODe is written protects already generated documents by ignoring future requests when documents already exist. If you plan to update your documents many times with the same build name directory you will want to use the updateApi option.

buildOptions.updateApi = true;

Setting this option to true tells NODe to create and overwrite the existing documents with each request.

As a Script (0.10.2 and earlier)

You can also use NODe as your own script simply to pull and create Node.js documentation, but with less options. Even though this feature has less options, the options that do not exist can be easily scripted.

$ npm start

You will find the documentation built within the ./node-documents folder within the NODe API folder, and created for the version of node used to execute the script.

There are few options you can use with this script, but you will need to run it through node manually.

By default the NODe API will create documentation based on version of node executing the script, but users can explicitly set the version to create when executing the module using the -v flag:

$ node app/ -v [version number]

Without this option, the NODe API will build the documentation into the build directory within the NODe folder itself. To build the documents into a specific folder, you can instead use the -f flag followed by the specified folder:

$ node app/ -f [folder]

License

The Node Offline Doucmentation API has been written with the license.

The Node.js Document API is property of the Node.js Project. Node.js License