Socket
Socket
Sign inDemoInstall

dgeni-packages

Package Overview
Dependencies
11
Maintainers
1
Versions
147
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

dgeni-packages


Version published
Maintainers
1
Install size
6.14 MB
Created

Changelog

Source

v0.6.0 03/07/2014

New Features

  • feat(tagParser): only ignore tags that are defined with ignore property 59492bea
  • feat(jsdoc tags): improve jsdoc tag coverage d8eb2b43
  • feat(PartialNames): getLink disambiguates docs by area 6da98dd5
  • feat(jsdoc/compute-paths): add new processor 23cc829a
  • feat(partial-names): add removeDoc method 746a0bc7
  • test(link handler): fix test, since the handler now throws on error a15053ab

Bug Fixes

  • fix(compute-paths): ensure contentsFolder is applied correctly 301877fc
  • fix(filter-ngdocs processor): run before tags are extracted a090cf49

Refactorings

  • refact(ngdoc/id tag def): move functionality to its own doc processor 268ac3bd
  • refact(partial-name processor): move adding docs to own processor 8684226b

BREAKING CHANGE

  • If you relied on undefined tags being quietly ignored your processing will now fail. You should add new tag defintions for all tags that you wish to ignore of the form:
{ name: 'tag-to-ignore', ignore: true }

Readme

Source

Dgeni Packages

This repository contains a collection of dgeni packages that can be used by the dgeni documentation generator to create documentation from source code.

Out of the box there are the following packages:

  • jsdoc - a standard set of processors that can extract jsdoc documents and render them as HTML.
  • ngdoc - (depends upon the jsdoc package) an extra set of processors and templates that are specific to angularjs projects.
jsdoc Package

This package contains the following processors:

  • doc-extractor - used to load up documents from files. This processor can be configured to use a set of extractors. The jsdoc package has a single js extractor, which can extract documents from jsdoc style comments in files.
  • tag-parser - parses the jsdoc tags in the extracted documents.
  • tag-extractor - extracts the tags information and converts it to specific properties on the documents, based on a set of tag-definitions. The jsdoc package contains definitions for the following tags: name, memberof, param, property, returns, module, description, usage, animations, constructor, class, classdesc, global, namespace and kind.
  • nunjucks-renderer - uses the Nunjucks template library to render the documents into files, such as HTML or JS, based on templates.

This package does not provide any templates.

ngdoc Package

There is one new document extractor in this package, ngdoc, which can pull a single document from an ngdoc content file.

On top of the processors provided by the jsdoc package, this packages adds the following processors:

  • filter-ngdocs - For AngularJS we are only interested in documents that contain the @ngdoc tag. This processor removes docs that do not contain this tag.

  • memberof - All docs that have a @memberof tag are attached to their parent document and removed from the top level list of docs.

  • links - Parse all {@link ... } inline tags in the docs and replace with real anchors. This processor is able to compute URLs for code references.

  • examples - Parse the <example> tags from the content, generating new docs that will be converted to extra files that can be loaded by the application and used, for example, in live in-place demos of the examples and e2e testing.

  • module - Some docs that represent a module. The processor will compute the package name for the module (e.g. angular or angular-sanitize). It also collects up all documents that belong to the module and attaches them to the module doc in the components property.

  • paths - This processor computes the URL to the document and the path to the final output file for the document.

  • service-provider-mapping - relates documents about angular services to their corresponding angular service provider document.

This package also provides a set of templates for generating an HTML file for each document: api, directive, error, filter function, input, module, object, overview, provider, service, type and a number to support rendering of the runnable examples.

HTML Rendering

We render each of these documents as an HTML page. We use the "nunjucks" JavaScript template tool-kit to generate HTML based on the data in each document. We have nunjucks tags and filters that can render links and text as markdown and will highlight code.

The template used to render the doc is computed by a templateFinder, which uses the first match from a set of patterns in a set of folders, provided in the configuration. This allows a lot of control to provide generic templates for most situations and specific templates for exceptional cases.

Here is an example of the angularjs patterns:

rendering: {

      ...

      templatePatterns: [
        '${ doc.template }',
        '${ doc.id }.${ doc.docType }.template.html',
        '${ doc.id }.template.html',
        '${ doc.docType }.template.html'
      ],

      ...

      templateFolders: [
        'templates'
      ]

    },

Keywords

FAQs

Last updated on 07 Mar 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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc