Socket
Socket
Sign inDemoInstall

dgeni

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dgeni

Flexible JavaScript documentation generator used by AngularJS


Version published
Weekly downloads
4.3K
decreased by-47.87%
Maintainers
1
Weekly downloads
 
Created
Source

Dgeni - Documentation Generator Build Status

The node.js documentation generation utility by angular.js and other projects.

Getting started

Try out the Dgeni example project at https://github.com/petebacondarwin/dgeni-example

Installation

You'll need node.js and a bunch of npm modules installed to run this tool. Get node.js from here: http://nodejs.org/. Then, in your project folder run:

npm install dgeni --save

This will install Dgeni and any modules that Dgeni depends upon.

Architecture

The tool is modular. There are three main phases of document generation:

  • File Reading - reading docs from files.
  • Doc Processing - parsing ngdocs and calculating meta data
  • HTML Rendering - converting the parsed docs into HTML

Each of these phases will execute a set of plugins (extractors, processors and renderers) to generate the documentation.

Document Processors

In practice all these phases are executed by a pipeline of document processors. Each processor can provide a list of other processors that it must come before or after, and it can provide zero or more of the following handlers:

  • init(config, injectables) { ... } - gives the processor and opportunity to initialize itself based on the configuration object and also add items to the dependency injection container.
  • process(docs, ...) { ... } - invoked by the dependency injector. Each processor's process handler is called an order that fits with the declared runBefore and runAfter dependencies.

The before and after handlers can be synchronous or asynchronous. If they are synchronous then they should return undefined or a new array of documents. If they are asynchronous then they must return a promise, which will resolve to undefined or a new collection of documents.

Pseudo Marker Processors

There are a number of processors that don't do anything but act as markers for stages of the processing. You can use these markers in runBefore and runAfter properties to ensure that your processor is run at the right time. Here is the list of these marker processors in order:

  • loading-files
  • files-loaded
  • parsing-tags
  • tags-parsed
  • extracting-tags
  • tags-extracted
  • processing-docs
  • docs-processed
  • adding-extra-docs
  • extra-docs-added
  • rendering-docs
  • docs-rendered
  • writing-files
  • files-written

Packages

Document processors, templates and other configuration can be bundled into a package. Packages can load up and extend other packages. In this way you can build up your custom configuration on top of an existing configuration.

There are some initial packages defined in the dgeni-packages repository.

FAQs

Package last updated on 11 Apr 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc