Code Monkey home page Code Monkey logo

dgeni-packages's Introduction

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:

  • base - The minimal set of processors to get started with Dgeni
  • git - Provides some git and version information
  • jsdoc - Tag parsing and extracting
  • nunjucks - The nunjucks template rendering engine. No longer in jsdoc - you must add this explicitly to your config or you will get Error: No provider for "templateEngine"! (Resolving: templateEngine)
  • ngdoc - The angular.js specific tag-defs, processors and templates. This loads the jsdoc and nunjucks packages for you.
  • examples - Processors to support the runnable examples feature in the angular.js docs site.
  • dgeni - Support for documenting Dgeni packages (incomplete)
  • typescript - Tag parsing and extracting for TypeScript modules.

base Package

Processors

  • computeIdsProcessor - Computes the id and aliases for documents using templates or helper functions, on a per docType basis.
  • computePathsProcessor - Computes the path and outputPath for documents using templates or helper functions, on a per docType basis.
  • debugDumpProcessor - dump the current state of the docs array to a file (disabled by default)
  • readFilesProcessor - used to load up documents from files. This processor can be configured to use a set of file readers. There are file readers in the jsdoc and ngdoc packages.
  • renderDocsProcessor - render the documents into a property (doc.renderedContent) using a templateEngine, which must be provided separately - see nunjucks package.
  • unescapeCommentsProcessor - unescape comment markers that would break the jsdoc comment style, e.g. */
  • writeFilesProcessor - write the docs that have an outputPath to disk

Services

  • aliasMap - A map of ids/aliases to docs. This is used for matching references to documents in links and relations such as modules and object members.
  • createDocMessage - a helper for creating nice messages about documents (useful in logging and errors)
  • encodeDocBlock - convert a block of code into HTML
  • templateFinder - search folders using patterns to find a template that matches a given document.
  • trimIndentation - "intelligently" trim whitespace indentation from the start of each line of a block of text.
  • writeFile - Write some contents to a file, ensuring the path to the file exists.

Template Finding

The template used to render a doc is computed by the 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 some standard template patterns:

templateFinder.templatePatterns = [
  '${ doc.template }',
  '${ doc.area }/${ doc.id }.${ doc.docType }.template.html',
  '${ doc.area }/${ doc.id }.template.html',
  '${ doc.area }/${ doc.docType }.template.html',
  '${ doc.id }.${ doc.docType }.template.html',
  '${ doc.id }.template.html',
  '${ doc.docType }.template.html'
]

git Package

This package provides some git and version information to the renderDocsPocessor that is available in the templates. This code as it is was made for the angular.js document generation, including some custom logic for special versions. However, any of the services can be overridden with custom behavior.

The git information is made available to templates via the extraData.git property. See the section below to see an example usage.

Services

  • decorateVersion - all semvers are passed through this function so that additional data can before added to them.
  • getPreviousVersions - pulls versions from git tags of the repository.
  • gitData - the additional information that is added to the extraData of renderDocsPocessor.
  • gitRepoInfo - the owner and repo of the local git repository.
  • packageInfo - the contents of the package.json.
  • versionInfo - aggregated version and git information.

Using extraData.git

An example as used in git/templates/api/api.template.html

<a href='https://github.com/{$ git.info.owner $}/{$ git.info.repo $}/tree/{$ git.version.isSnapshot and 'master' or git.version.raw $}/{$ doc.fileInfo.projectRelativePath $}#L{$ doc.startingLine $}' class='view-source pull-right btn btn-primary'>
  <i class="glyphicon glyphicon-zoom-in">&nbsp;</i>View Source
</a>

nunjucks Package

This package provides a nunjucks driven implementation of the templateEngine required by the base package renderDocsPocessor. The "nunjucks" JavaScript template tool-kit to generates HTML based on the data in each document. We have nunjucks templates, tags and filters that can render links and text as markdown and will highlight code.

Services

  • nunjucks-template-engine - provide a templateEngine that uses the Nunjucks template library to render the documents into text, such as HTML or JS, based on templates.

jsdoc Package

File Readers

  • jsdoc - can read documents from jsdoc style comments in source code files.

Processors

  • codeNameProcessor - infer the name of the document from the code following the document in the source file.
  • extractTagsProcessor - use a tagExtractor to extract information from the parsed tags.
  • inlineTagsProcessor - Search the docs for inline tags that need to have content injected
  • parseTagsProcessor - use a tagParser to parses the jsdoc tags in the document content.

Tag Definitions

The jsdoc package contains definitions for a number of standard jsdoc tags including: name, memberof, param, property, returns, module, description, usage, animations, constructor, class, classdesc, global, namespace, method, type, kind, access, public, private and protected.

Services (Tag Transformations)

This package provides a number of Transform services that are used in Tag Definitions to transform the value of the tag from the string in the tag description to something more meaningful in the doc.

  • extractAccessTransform - extract an access level (e.g. public, protected, private) from tags You can configure this transform to register access tags and set the property where access info is written.
    • extractAccessTransform.allowedTags.set('tagName', [propertValue]) - register a tag that can act as as an alias to set an access level. The propertyValue is optional and if not undefined will return this value from the transform that will be written to the property. (defaults to public:undefined, private:undefined, protected:undefined)
    • extractAccessTransformImpl.allowedDocTypes.set('docType') - register a docType that can contain access type tags (defaults to "property" and "method")
    • extractAccessTransformImpl.accessProperty - specify the property to which to write the access value (defaults to "access")
    • extractAccessTransformImpl.accessTagName - specify the name of the tag that can hold access values (defaults to "access")
  • extractNameTransform - extract a name from a tag
  • extractTypeTransform - extract a type from a tag
  • trimWhitespaceTransform - trim whitespace from before and after the tag value
  • unknownTagTransform - add an error to the tag if it is unknown
  • wholeTagTransform - Use the whole tag as the value rather than using a tag property
  • codeNameService - helper service for codeNameProcessor, registers code name matchers and performs actual matches against AST tree

Templates

This package does not provide any templates nor a templateEngine to render templates (use the nunjucks package to add this).

Tag Definitions

This package provides a minimal implementation of tags from the JSDoc project. They extract the name and type from the tag description accordingly but do not fully implement all the JSDoc tag functionality.

Code Name Matchers

Matcher performs a search for a suitable code name at the given jsdoc code point (AST node). codeNameService matches AST node name against matcher name and if suitable matcher is found, executes it.

Matcher name consists of <AstNodeName> and NodeMatcher substrings, i.e. FunctionExpressionNodeMatcher then latter is stripped and matcher is used by the former part, i.e. FunctionExpression.

Matcher should accept single argument - node and return either string with name or literal null.

Matchers:

  • ArrayExpression
  • ArrowFunctionExpression
  • AssignmentExpression
  • CallExpression
  • ClassDeclaration
  • ExportDefaultDeclaration
  • ExpressionStatement
  • FunctionDeclaration
  • FunctionExpression
  • Identifier
  • Literal
  • MemberExpression
  • MethodDefinition
  • NewExpression
  • ObjectExpression
  • Program
  • Property
  • ReturnStatement
  • ThrowStatement
  • VariableDeclaration
  • VariableDeclarator

ngdoc Package

The ngdoc Package depends upon the jsdoc and nunjucks packages. It provides additional support for non-API documents written in files with .ngdoc extension; it also computes additional properties specific to Angular related code.

File Readers

  • ngdoc - can pull a single document from an ngdoc content file.

Processors

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

  • generateComponentGroupsProcessor - Generate documents for each group of components (by type) within a module

  • memberDocsProcessor - This processor connects docs that are members (properties, methods and events) to their container docs, removing them from the main docs collection.

  • moduleDocsProcessor - This processor computes properties for module docs such as packageName and packageFileName; it adds modules to the moduleMap service and connects all the docs that are in a module to the module doc in the components property

  • providerDocsProcessor - This processor relates documents about angular services to their corresponding provider document.

Tag Definitions

This package modifies and adds new tag definitions on top of those provided by the jsdoc package: area, element, eventType, example, fullName, id, module, name, ngdoc, packageName, parent, priority, restrict, scope and title.

Inline Tag Definitions

  • link - Process inline link tags (of the form {@link some/uri Some Title}), replacing them with HTML anchors

Services

  • getAliases() - Get a list of all the aliases that can be made from the provided doc
  • getDocFromAliases() - Find a document from the aliasMap that matches the given alias
  • getLinkInfo() - Get link information to a document that matches the given url
  • getTypeClass() - Get a CSS class string for the given type string
  • moduleMap - A collection of modules keyed on the module id

Templates

This package 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.

You should be aware that because of the overlap in syntax between Nunjucks bindings and AngularJS bindings, the ngdoc package changes the default Nunjucks binding tags:

templateEngine.config.tags = {
  variableStart: '{$',
  variableEnd: '$}'
};

Rendering Filters

  • code - Render a span of text as code
  • link - Render a HTML anchor link
  • typeClass - Render a CSS class for a given type

Rendering Tags

  • code - Render a block of code

examples Package

This package is a mix-in that provides functionality for working with examples in the docs.

Inside your docs you can markup inline-examples such as:

Some text before the example

<example name="example-name">
  <file name="index.html">
    <div>The main HTML for the example</div>
  </file>
  <file name="app.js">
    // Some JavaScript code to be included in the example
  </file>
</example>

Some text after the example

Processors

  • generateExamplesProcessor - Add new docs to the docs collection for each example in the examples service that will be rendered as files that can be run in the browser, for example as live in-place demos of the examples or for e2e testing. This processor must be configured with a collection of deployments that tell it what versions of each example to generate. See the section of Deployment Configuration below.
  • parseExamplesProcessor - Parse the <example> tags from the content and add them to the examples service
  • generateProtractorTestsProcessor - Generate a protractor test files from the e2e tests in the examples. This processor must be configured with a collection of deployments that tell versions of the protractor tests to generate. See the section of Deployment Configuration below.

Deployment Configuration

The generateExamplesProcessor and generateProtractorTestsProcessor processors have a required property called deployments. This property should be an array of deployment information objects telling the processor what files to generate.

For instance you might have a "debug" deployment that loads angular.js into the example, and also a "default" deployment that loads angular.min.js into the example. Equally you might have deployments that use JQuery and some that only use Angular's jqLite.

You can configure this in your package like so:

.config(function(generateExamplesProcessor, generateProtractorTestsProcessor) {
  var deployments = [
    { name: 'debug', ... },
    { name: 'default', ... }
  ];

  generateExamplesProcessor.deployments = deployments;
  generateProtractorTestsProcessor.deployments = deployments;
});

A deployment can must have a name property and can also include an examples property that contains information about paths and extra files to inject into runtime examples. Further a protractor test is generated for each deployment and it uses the deployment name to find the path to the associated example for that deployment.

{
  name: 'default',
  examples: {
    commonFiles: {
      scripts: [ '../../../angular.js' ]
    },
    dependencyPath: '../../../'
  }
}

Here you can see we have a default deployment that injects the angular.js file into all examples, plus any dependencies referenced in the example itself are made relative to the given dependencyPath.

Inline Tag Definitions

  • runnableExample - Inject the specified runnable example into the doc

Services

  • exampleMap - a hash map holding each example by id, which is a unique id generated from the name of the example

post-process-html Package

This package provides a HTML post process manager powered by rehype. It uses the rehype processing engine to manipulate the renderedContent HTML via rehype "plugins" that work with HTML ASTs (HASTs). Read more https://github.com/wooorm/rehype

Processors

  • post-process-html - Use the rehype processing engine to manipulate the renderedContent HTML via rehype "plugins" that work with HTML ASTs (HASTs). Each plugin is a factory function that will be called with the "rehype" engine as this. The factory should return a transform function that takes a HAST and returns a boolean orundefined. The HAST can be mutated by the "transform" function. If false is returned then the processing stops with that plugin.

typescript Package

File Readers

  • at the moment we are not using a filereader but the readTypeScriptModules processor to read our modules.

Processors

  • readTypeScriptModules - parse the sourceFiles with the help of the tsParser service and return a doc for each exported member. You can either pass an array of strings or an array of objects with include and exclude globbing patterns. A mix of both is possible as well. The processor can be configured to export private members (marked as /** @internal */ as well as members starting with an underscore (_)) by setting the property hidePrivateMembers to false. Set sortClassMembers to true to sort instance and static members by name (defaults to order of appearence). You can ignore special exports by adding strings or regexes to the ignoreExportsMatching property (defaults to ___esModule.

Services

  • convertPrivateClassesToInterfaces - pass this service a list of exported docs and if it represents a class that is marked as /** @internal */ the doc will be converted to represent an interface.
  • tsParser - uses the typescript compiler and a host created by createCompilerHost to actually read and compile the source files. The docs are created from the symbols read by the typescript program.
  • createCompilerHost - creates a new compiler host which can, among other things, resolve file paths and check if files exist
  • getContent - retrieves the file contents and comments.

Templates

This package does not provide any templates nor a templateEngine to render templates (use the nunjucks package to add this).

Tag Definitions

Please note that at the moment the @param documentation is ignored.

dgeni-packages's People

Contributors

0x-r4bbit avatar ajoslin avatar alan-agius4 avatar brunnerlivio avatar c0bra avatar davidreher avatar dependabot[bot] avatar devversion avatar ext avatar forresst avatar gkalpak avatar haschu avatar heycalmdown avatar jeffbcross avatar jerryorta-dev avatar jimthedev avatar juliemr avatar keirlawson avatar kirschre avatar lgalfaso avatar lmores avatar nhorvath avatar perrygovier avatar petebacondarwin avatar roddolf avatar rodleviton avatar splaktar avatar stofolus avatar thorn0 avatar wingedfox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dgeni-packages's Issues

Linking to ids from {@link ...} doesn't work

Specfifically something like:

{@link ngModel.ngModelController#$validators $validators}

where #$validators refers to an element with the id $validators

@petebacondarwin I assume there's a processor which extracts all possible link targets and another one that replaces the references with real links?

jsdoc does not recongise CallExpression node type

I'm attempting to run dgeni 0.3.0 with dgeni-packages 0.9.0 I'm getting a warning within jsdoc which I'm sure isn't serious, but I thought I'd report it anyway. This wasn't happening on the older versions.

warn:    HELP!
warn:     type=CallExpression, type=MemberExpression, computed=false, type=CallExpression, type=MemberExpression, computed=false, type=Identifier, name=angular, range=[201, 208], line=12, column=2, line=12, column=9, type=Identifier, name=module, range=[209, 215], line=12, column=10, line=12, column=16, range=[201, 215], line=12, column=2, line=12, column=16, arguments=[type=Literal, value=mallzee.services.user, raw='mallzee.services.user', range=[216, 239], line=12, column=17, line=12, column=40, type=ArrayExpression, elements=[], range=[241, 243], line=12, column=42, line=12, column=44], range=[201, 244], line=12, column=2, line=12, column=45, type=Identifier, name=factory, range=[250, 257], line=13, column=5, line=13, column=12, range=[201, 257], line=12, column=2, line=13, column=12, arguments=[type=Literal, value=UserService, raw='UserService', range=[258, 271], line=13, column=13, line=13, column=26, type=ArrayExpression, elements=[type=Literal, value=MallzeeService, raw='MallzeeService', range=[274, 290], line=13, column=29, line=13, column=45, type=FunctionExpression, id=null, params=[type=Identifier, name=MallzeeService, range=[301, 315], line=13, column=56, line=13, column=70], defaults=[], type=BlockStatement, body=[], range=[317, 325], line=13, column=72, line=15, column=5, rest=null, generator=false, expression=false, range=[292, 325], line=13, column=47, line=15, column=5], range=[273, 326], line=13, column=28, line=15, column=6], range=[201, 327], line=12, column=2, line=15, column=7

Happen warning @include...

I generate of AngularJS document. but warning happen.

warn:    Invalid tags found - doc "ngHide" (directive)  - from file "ng/directive/ngShowHide.js" - starting at line 179, ending at line 320
Line: 279: @import url(../../components...

How exclude @import tag?

npm install dgeni-packages – No compatible version found

When trying to install the dgeni-packages, I am getting the following error copied from the npm-debug.log file:

489 error Error: No compatible version found: esprima@'^1.0.4'
489 error Valid install targets:
489 error ["1.1.0","0.7.0","0.8.0","0.8.1","0.8.2","0.9.0","0.9.1","0.9.2","0.9.3","0.9.4","0.9.5","0.9.6","0.9.7","0.9.8","0.9.9","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.1.0","1.1.1","1.2.0","1.2.1","1.2.2"]
489 error at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:684:10)
489 error at /usr/local/lib/node_modules/npm/lib/cache.js:606:10
489 error at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:138:7)
489 error at Object.oncomplete (fs.js:107:15)
490 error If you need help, you may report this log at:
490 error http://github.com/isaacs/npm/issues
490 error or email it to:
490 error [email protected]
491 error System Darwin 12.5.0
492 error command "node" "/usr/local/bin/npm" "install" "dgeni-packages"
493 error cwd /Users/alex/Documents/Projects/ISkippedThisAfterwards/node
494 error node -v v0.10.1
495 error npm -v 1.2.15
496 verbose exit [ 1, true ]

Need to support typescript

Because of the processor jsDocFileReader uses esprima to parse javascript syntax, we can't feed typescript files into dgeni directly.
It'd be possible if we can support multiple syntax parser or fallback which is like simple text parser.

Any thought?

Worth to reference: https://github.com/lbovet/typson

"Invalid tags found" warnings from @methoOf?

I'm making an attempt at bringing some old ngdoc documentation forward to dgeni and I'm getting a ton of warnings that look like this:

warn:    Invalid tags found - doc "registerStyleComputation" (function)  - from file "js/core/factories/Grid.js" - starting at line 674, ending at line 682
Line: 676: @methodOf  ui.grid.class:Grid...

The ngdoc section looks like this:

/**
   * @ngdoc function
   * @name registerStyleComputation
   * @methodOf ui.grid.class:Grid
   * @description registered a styleComputation function
   * 
   * If the function returns a value it will be appended into the grid's `<style>` block
   * @param {function($scope)} styleComputation function
   */

There's no clarification on WHY it's a warning, and both google and the angular source have failed to help me find out why. Removing the @methodOf line does get rid of the warning so it's definitely coming from there.

I've tried swapping around various ways of identifying the function (or is it "method"?) thinking that I needed a particular undocumented syntax for @methoOf, but no luck.

Any ideas?

@module \n - triming output path

I have a src file with the following documentation

/**
 * @ngdoc service
 * @module x
 * @name Thing
 *
 * @description 
 * Something
 */
app.service('Thing', [
    '$window',
    function () {

    }
]);

My configuration file is setup to use ngdoc conf with the basic setup to parse one source.files

When I go to generate the documentation with the configured generator the doc's outputPath is not trimmed correctly resulting in a value of:
C:\\Git\\dgeni-example\\build\\docs\\api\\x\\service\\MyService\n.html
which I thought was kindof weird considering the @overview tag works... (But I also don't have to specify a module tag for that tag)

The resulting log is as follows:

info: Loading config C:/Git/dgeni-example/docs/dgeni.conf.js
info:    Read config from "C:/Git/dgeni-example/docs/dgeni.conf.js"
info:    Logging set to "info"
info:    Processing docs
info:    running processor: read-files
info:    running processor: parse-tags
info:    running processor: filter-ngdocs
info:    running processor: extract-tags
info:    running processor: code-name
error:   Error: ENOENT, open 'C:\Git\dgeni-example\build\docs\api\x\service\Thing
.html'
info:    running processor: compute-id
info:    running processor: partial-names
info:    running processor: api-docs
info:    running processor: component-groups-generate
info:    running processor: compute-path
info:    running processor: render-docs
info:    running processor: unescape-comments
info:    running processor: inline-tags
info:    running processor: write-files
info:    Processed 0 docs

Where in the code should we check the outputPath to make sure this doesn't happen?

The jsDoc type extractor turns recordTypes into "Object"

JSDoc allows to document the object structure of arguments and return values in the following format:

/**
 * @ngdoc function
 * @name funky  
 * @returns {{x:number, y:number}}
 */

However the jsdoc implementation of dgeni replaces the {x:number, y:number} record type only with the word "Object".

The documented information about the object structure is lost.

https://github.com/angular/dgeni-packages/blob/master/jsdoc/tag-defs/transforms/extract-type.js#L80

Do not fail in typeProcessor.js when parsing params

I am using dgeni to generate the documentation for protractor. Part of the documentation includes a file which I cannot change (webdriver.js).

The typeProcessor.js fails when parsing one of the docs for webdriver.js. Can you add an option to skip throwing an exception? I am using an older version of dgeni-packages and I want upgrade to the latest.

Here is the error:
error: Error parsing tags for doc starting at 645 in file node_modules/selenium-webdriver/lib/webdriver/webdriver.js

This is the jsdoc that fails:

/**
 * Schedule a command to find an element on the page. If the element cannot be
 * found, a {@code bot.ErrorCode.NO_SUCH_ELEMENT} result will be returned
 * by the driver. Unlike other commands, this error cannot be suppressed. In
 * other words, scheduling a command to find an element doubles as an assert
 * that the element is present on the page. To test whether an element is
 * present on the page, use {@code #isElementPresent} instead.
 *
 * <p>The search criteria for find an element may either be a
 * {@code webdriver.Locator} object, or a simple JSON object whose sole key
 * is one of the accepted locator strategies, as defined by
 * {@code webdriver.Locator.Strategy}. For example, the following two statements
 * are equivalent:
 * <code><pre>
 * var e1 = driver.findElement(By.id('foo'));
 * var e2 = driver.findElement({id:'foo'});
 * </pre></code>
 *
 * <p>When running in the browser, a WebDriver cannot manipulate DOM elements
 * directly; it may do so only through a {@link webdriver.WebElement} reference.
 * This function may be used to generate a WebElement from a DOM element. A
 * reference to the DOM element will be stored in a known location and this
 * driver will attempt to retrieve it through {@link #executeScript}. If the
 * element cannot be found (eg, it belongs to a different document than the
 * one this instance is currently focused on), a
 * {@link bot.ErrorCode.NO_SUCH_ELEMENT} error will be returned.
 *
 * @param {!(webdriver.Locator|Object.<string>|Element)} locatorOrElement The
 *     locator strategy to use when searching for the element, or the actual
 *     DOM element to be located by the server.
 * @param {...} var_args Arguments to pass to {@code #executeScript} if using a
 *     JavaScript locator.  Otherwise ignored.
 * @return {!webdriver.WebElement} A WebElement that can be used to issue
 *     commands against the located element. If the element is not found, the
 *     element will be invalidated and all scheduled commands aborted.
 */

Getting error for `@undefined` tag

I have a doc that basically looks like this:

/**
 * @method foo
 * @memberof bar
 * ...
*/

Using this annotation (which actually seems pretty reasonable) I'm getting this error:

error:   Error: "@undefined" tag found on non-undefined document in file "node_modules/sofa-basket-service/src/sofa.basketService.js" at line 71
    at module.exports.transformFn (/Users/pp/projects/sofa/node_modules/dgeni-packages/jsdoc/tag-defs/index.js:20:15)
    at /Users/pp/projects/sofa/node_modules/dgeni-packages/jsdoc/lib/extract-tags.js:55:30
    at Function.forEach (/Users/pp/projects/sofa/node_modules/lodash/dist/lodash.js:3297:15)
    at /Users/pp/projects/sofa/node_modules/dgeni-packages/jsdoc/lib/extract-tags.js:8:7
    at /Users/pp/projects/sofa/node_modules/dgeni-packages/jsdoc/processors/tag-extractor.js:22:7
    at Function.forEach (/Users/pp/projects/sofa/node_modules/lodash/dist/lodash.js:3297:15)
    at module.exports.process (/Users/pp/projects/sofa/node_modules/dgeni-packages/jsdoc/processors/tag-extractor.js:20:7)
    at invoke (/Users/pp/projects/sofa/node_modules/dgeni/node_modules/di/lib/injector.js:75:15)
    at processingPromise.then.catch.error.message (/Users/pp/projects/sofa/node_modules/dgeni/lib/doc-processor.js:117:31)
    at _fulfilled (/Users/pp/projects/sofa/node_modules/dgeni/node_modules/q/q.js:798:54)

I know that it comes from the tag definition of the memberof tag in the jsdoc package. But according to the source (which looks like this):

...
transformFn: function (doc, tag) {
  if (!(doc.docType === 'event' || doc.docType === 'property' || doc.docType === 'method')) {
    throw new Error( ... )
  }
}
...

The error shouldn't be thrown. Is this a bug or am I doing something wrong?

Should @method tag be supported by jsdoc package?

When using jsdoc package it yells about an unknown tag @method. This tag is actually supported by jsdoc by default. I wonder if we should add it to the tag definitions, or if it's intended for some reason.

Also, in jsdoc/tag-defs/index.js the defaultFn for memberof checks optionally for method property.

extractors/jsdoc.js extractor returns undefined docs for comments

I'm trying to upgrade to the latest version 0.2.2 / 0.4.0. Apparently the jsdoc.js extractor is returning undefined elements for comments with this format:

/*
 * Mix in other webdriver functionality to be accessible via protractor.
 */

Can you add a _.compact to discard unwanted elements?

return _.compact(_.map(ast.comments, docFromComment));

To reproduce just follow these steps:

  1. Get the upgradeDgeni branch https://github.com/andresdominguez/protractor/tree/upgradeDgeni
  2. Set a breakpoint in doc-extractor.js:64
  3. Run scripts/generate-docs.js

The first doc is undefined, the second doc is a correctly formed doc.

runnableExample has no outputPath

I'm really stuck on this one. Trying to get an example to build properly but I get this:

debug:   Document "example-tutorial1-runnableExample, runnableExample" has no outputPath.

I've tried going through all the docs config for angular.js, angular-material, ionic, etc, but can't figure out how the outputPath gets set for examples. It seems like the function is just a noop in the the examples package, but I can't see any of the projects that use this package (angular.js & angular-material) as providing a way to determine the outputPath.

This is with v0.10.8. I tried 0.10.3 just in case.

Also I can provide dumps of my config if that would be helpful. I'm hoping it's something minor that I've just missed though.

Add "deployment" instructions to README in examples package

Currently, when using the examples package as described in its readme, the following error occurs:

[gulp] 'dgeni' errored after 255 ms No deployment environments found in the config.

Without digging in angular.js' docs configuration, one wouldn't even know that there's a deployment configuration, or even what it's for or how to configure it.

We need to document what kind of "deployment" configuration is needed to get the examples package running.

Using @ngdoc property causes error

It seems like I'm doing something wrong.
Since you does not yet have documentation, please help me with my config.

I set up my documentation. All seems to work.
But if I use @ngdoc property directive, dgeni fails with error in extractTagsProcessor:

info:    running processor: readFilesProcessor
info:    running processor: extractJSDocCommentsProcessor
info:    running processor: parseTagsProcessor
info:    running processor: filterNgDocsProcessor
info:    running processor: extractTagsProcessor
error:   Error processing docs:  expected=["!", "$", "(", "*", "...", "?", "Function", "\\", "_", "break", "case", "catch", "class", "const", "continue", "debugger", "default", "delete", "do", "else", "enum", "export", "extends", "false", "finally", "for", "function", "if", "implements", "import", "in", "instanceof", "interface", "let", "new", "null", "package", "private", "protected", "public", "return", "static", "super", "switch", "this", "throw", "true", "try", "typeof", "undefined", "var", "void", "while", "with", "yield", "{", Unicode letter number, Unicode lowercase letter, Unicode modifier letter, Unicode other letter, Unicode titlecase letter, Unicode uppercase letter], found=[, offset=0, line=1, column=1, name=SyntaxError, message=Error running processor "extractTagsProcessor":
Expected "!", "$", "(", "*", "...", "?", "Function", "\\", "_", "break", "case", "catch", "class", "const", "continue", "debugger", "default", "delete", "do", "else", "enum", "export", "extends", "false", "finally", "for", "function", "if", "implements", "import", "in", "instanceof", "interface", "let", "new", "null", "package", "private", "protected", "public", "return", "static", "super", "switch", "this", "throw", "true", "try", "typeof", "undefined", "var", "void", "while", "with", "yield", "{", Unicode letter number, Unicode lowercase letter, Unicode modifier letter, Unicode other letter, Unicode titlecase letter or Unicode uppercase letter but "[" found.

I'm using dgeni with ngdoc and nunjucks packages.

Empty space between @link's anchor name causes only part of it to be anchored

For example, the following paragraph (taken from the AngularJS FAQ):

We run our extensive test suite against the following browsers: Safari, Chrome, Firefox, Opera,
IE8, IE9 and mobile browsers (Android, Chrome Mobile, iOS Safari). See {@link guide/ie Internet 
Explorer Compatibility} for more details in supporting legacy IE browsers.

results to the following HTML:

We run our extensive test suite against the following browsers: Safari, Chrome, Firefox, Opera, IE8, IE9 and mobile browsers (Android, Chrome Mobile, iOS Safari). See
<a href="guide/ie">Internet</a>
Explorer Compatibility for more details in supporting legacy IE browsers.

That is, only part of the link's name is placed within the anchor.

Setting the logging.level has no effect on degeni-packages

I am trying to find out how the templateFinder works and which templates are available.

After some searching I saw that there are log statements for that:
https://github.com/angular/dgeni-packages/blob/master/base/processors/templateFinder.js#L50

Unfortunately I am not able to get the logging working.

config

  // Set logging level
  config.set('logging.level', 'silly');

When inspecting templateFinder.js line 50 the value of log.level is undefined and winston uses the default value which is info.

Processor: Verify anchor links

We need a processor that will run through the generated docs and ensure that any local links refer to valid anchors in the docs.

Anyone want to have a crack at this?

Add IDs to methods/events, so they can be linked to directly.

This should be paired with changes to the CSS so that we can link to these without them being hidden by the fixed headers, but that's a bit too tricky for me (CSS is hard, let's go shopping!)

I've had a go at prototyping this for methods with a simple change:

In the methods template:

  <li id="methods_{$ functionLinkable(method) $}">

And the macro:

{%- macro functionLinkable(fn) %}{%- if fn.name.indexOf('#') >= 0 %}{$ fn.name.substr(fn.name.indexOf('#') + 1) $}{%- else %}{$ fn.name $}{% endif -%}{% endmacro -%}

(I couldn't get it to format without newlines without putting it all on one line, but there's probably a better way). Obviously the macro is extremely rudimentary and could probably be done better.

Windows: npm install

I got some issues:

npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm ERR! fetch failed http://registry.npmjs.org/collections/-/collections-0.2.2.tgz
npm ERR! EEXIST, mkdir 'C:\dab-web\node_modules\dgeni-packages\node_modules\winston\no
de_modules\request\tests\ssl\ca'
File exists: C:\dab-web\node_modules\dgeni-packages\node_modules\winston\node_modules
request\tests\ssl\ca
Move it away, and try again.

npm ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--save
-dev" "dgeni" "dgeni-packages"
npm ERR! cwd C:\dev\svn\web3\dab-enterprise\branches\angulartemplate\dab-portal\dab-web
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path C:\dev\svn\web3\dab-enterprise\branches\angulartemplate\dab-portal\dab-web\node_modules\dgeni-packages\node_modules\winston\node_modules
\request\tests\ssl\ca
npm ERR! fstream_path C:\dev\svn\web3\dab-enterprise\branches\angulartemplate\dab-portal\dab-web\node_modules\dgeni-packages\node_modules\winston\node
_modules\request\tests\ssl\ca\server.crt
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! fstream_stack C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:171:23
npm ERR! fstream_stack C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\mkdirp\index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! error rolling back Error: EPERM, unlink 'C:\dev\svn\web3\dab-enterprise\branches\angulartemplate\dab-portal\dab-web\node_modules\dgeni-packag
es\node_modules\esprima\test\test.js'
npm ERR! error rolling back [email protected] { [Error: EPERM, unlink 'C:\dev\svn\web3\dab-enterprise\branches\angulartemplate\dab-portal\da
b-web\node_modules\dgeni-packages\node_modules\esprima\test\test.js']
npm ERR! error rolling back errno: 50,
npm ERR! error rolling back code: 'EPERM',
npm ERR! error rolling back path: 'C:\dev\svn\web3\dab-enterprise\branches\angulartemplate\dab-portal\dab-web\node_modules\dgeni-packages
\node_modules\esprima\test\test.js' }
npm ERR! Error: 400 Bad Request
npm ERR! at WriteStream. (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\fetch.js:58:12)
npm ERR! at WriteStream.emit (events.js:117:20)
npm ERR! at fs.js:1603:14
npm ERR! at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:105:5
npm ERR! at Object.oncomplete (fs.js:107:15)

npm warning when installing dgeni-packages

Installing dgeni ([email protected]) via npm worked fine:

npm install dgeni --save-dev 

But installing dgeni-packages ([email protected]) raised a (non fatal) error:

npm install dgeni-packages --save-dev
npm http GET https://registry.npmjs.org/weak-map
npm http 304 https://registry.npmjs.org/weak-map
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan

> [email protected] install /Users/sam/openshare/osconsole/node_modules/dgeni-packages/node_modules/nunjucks/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:86:
../src/thread.cc: In static member function ‘static void* fse::FSEvents::threadRun(void*)’:
../src/thread.cc:30: error: ‘kFSEventStreamCreateFlagFileEvents’ was not declared in this scope
In file included from ../fsevents.cc:87:
../src/constants.cc: In function ‘v8::Handle<v8::Object> Constants()’:
../src/constants.cc:19: error: ‘kFSEventStreamEventFlagItemRemoved’ was not declared in this scope
../src/constants.cc:20: error: ‘kFSEventStreamEventFlagItemInodeMetaMod’ was not declared in this scope
../src/constants.cc:21: error: ‘kFSEventStreamEventFlagItemRenamed’ was not declared in this scope
../src/constants.cc:22: error: ‘kFSEventStreamEventFlagItemModified’ was not declared in this scope
../src/constants.cc:23: error: ‘kFSEventStreamEventFlagItemFinderInfoMod’ was not declared in this scope
../src/constants.cc:24: error: ‘kFSEventStreamEventFlagItemChangeOwner’ was not declared in this scope
../src/constants.cc:25: error: ‘kFSEventStreamEventFlagItemXattrMod’ was not declared in this scope
../src/constants.cc:26: error: ‘kFSEventStreamEventFlagItemIsFile’ was not declared in this scope
../src/constants.cc:27: error: ‘kFSEventStreamEventFlagItemIsDir’ was not declared in this scope
../src/constants.cc:28: error: ‘kFSEventStreamEventFlagItemIsSymlink’ was not declared in this scope
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Darwin 10.8.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/sam/openshare/osconsole/node_modules/dgeni-packages/node_modules/nunjucks/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]
[email protected] node_modules/dgeni-packages
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected])

.. from some native code relating to nunjucks/fsevents/threads(?) - is anyone else seeing that / should I be worrying about it?

Log filePath when syntax error is thrown in jsdoc

This might seem like a strage request, since no could should contain syntax errors, but never the less, it's an issue I'm facing regularly.

Currently, I've fixed this myself for v0.9.x, having forked this repo, but I can't get my head wrapped around the new structure in v0.10.

Here's what I've done for v0.9.x, in jsdoc/file-readers/jsdoc.js:

    try{
      var ast = jsParser.parse(contents, {
        loc: true,
        range: true,
        comment: true
      });
    }catch(ex){
      // This will log the file containing errors
      log.error('File ' + filePath + ' contains syntax errors!');
      // This will re-throw the esprima exception, which will tell what line and
      // what kind of error
      throw ex;
    }

The implementation would be very similar for v0.10, but I can't figure out how to get the logging-tool injected into the file reader.

So, here's hoping for someone else to implement this! :)

Render custom ngdoc `@usage` fields consistently

Filters and objects format custom usage fields as code, directives and modules format them as markdown. They should all use markdown but then the linky filter will need to be updated in the Angular.js docs.

angular-docs future

the angular-docs branch looks really promising. What are your plans with it? Is it safe to use it as a base for a documentation app?

Requiring Externals

I understand the dgeni is still a proof of concept, but this is some really good stuff. Took me about a week to begin to grasp the power available to me, but that's besides the point here...

Ok so I'm creating documentation of an angular project for my company and I'm using dgeni obviously. One of the things I can't seem to do is set the @require tag for angular objects. For instance:

angular.module("myApp")
  .service("MyService", [
    "$resource",
    "$q",
    function($resource, $q){
    //some logic goes here
    }]);

Here, MyService requires both the $resource and $q services but if I were to annotate that with the requires tag, dgeni throws an exception saying it can't link to $q because it's not defined in my code. Now, I feel that I should not have to run the Angular.js file through my documentation system because it's not my code. I don't want third-party library documentation in my documentation system but if possible, I'd love to link to the types defined on that libraries official docs site.

So the first question is, am I being too idealistic in regards to how documentation should be generated? Is there an expectation that everyone using AngularJS and DGeni for documentation will parse the third-party libraries for types and whatnot? Again, I get this is a POC and because angular doesn't depend on anything this may have been a overlooked.

In the event this was a mistake, I can see a few paths being taken.

  1. Update the require tags so that it only links when the type is enclosed in curly brackets. This is probably the most backwards compatible way as I've seen other libraries reference angular services like that. Of course this would mean all references to ones own types would need to be updated to be enclosed by curly braces.
  2. Implement the external tag in jsDoc. This isn't a bad solution but it would need to be tweeked since the urls produced for a type is dependent on the way a site decided to lay things out. We can't assume an all angular party, so lots of thought would have to go into it.
  3. Implement an import/export tags. The idea behind this is the export tag can eventually make a json file that lists all the types and things that can be linked to and the import tag would point to this file. So in this case, each angular module would publish an export.json file or something like that and I would have one import tags per module I use. Then I could have @ requires {ng:$q} and a link to it on the Angularjs.org site would be created.

I sure there are other options, I just haven't thought of them. I like the 3rd option the best because it feels the most natural in the overall scheme of things. Plus it allows non-dgeni created project to make the json file and participate in the system. I would create those tags myself but without the support of the angular team I doubt it'd go anywhere.

missing module error

hi,

i've been having issues pointing my dgeni configuration to our angular app source code at work. It seems the problem has something to do with the order in which the ready-made dgeni-package processors read the files. here is what i have noticed. Say i have three modules aModule, bModule, and cModule with a submodule c1Module. And then these modules have factories, filters and directive attached to them respectively but the files for these come first in the directory, my build fails eventually because the dgeni-angular processor is assuming that there is a missing module once it encounters a services that belongs to a module it doesnt about yet.

Our app structure looks something like this.

aModule
   aService.js
   aDirective.js
   aFilter.js
   aModule.js
bModule
   bService.js
   bDirective.js
   bFilter.js
   bModule.js
cModule
  cService.js
  cModule.js
  c1Module
      c1Service
      c1Module.js

With the current dgeni-angular packages, my gulp setup fails at aService.js.

How can i fix this without changing my own structure or having to write my own processor?

Any help will be appreciated.

Improve docs: Clarify what a package exactly is/does

I know that the official dgeni README has a small part about packages (see https://github.com/angular/dgeni#packages), but it would be great if this repo include a small description about what a package really is, too.

There is one specific point I misunderstood at the beginning. I thought that every dgeni package would add new preprocessors and services. But every dgeni package can have an optionated config and alter existing packages, too.
Take https://github.com/petebacondarwin/dgeni-example as an example. I expected everything still to work if I change this

module.exports = new Package('dgeni-example', [
  require('dgeni-packages/jsdoc'),
  require('dgeni-packages/nunjucks')
])

to

module.exports = new Package('dgeni-example', [
  require('dgeni-packages/ngdoc'),
  require('dgeni-packages/jsdoc'),
  require('dgeni-packages/nunjucks')
])

or just

module.exports = new Package('dgeni-example', [
  require('dgeni-packages/ngdoc')
])

because the docs just say "ngdoc [...] loads the jsdoc and nunjucks packages for you.".

But actually no template will be processed now. Why? Because dgeni-packages/ngdoc changes the tags of the templateEngine (see https://github.com/angular/dgeni-packages/blob/master/ngdoc/index.js#L42).

While this is perfectly fine, it was kind of unexpected :)

esprima based doc extractor

It might be interesting to use a JS parser such as esprima, since this could also tell us about the code that follows the comment, so that we could imply some documentation straight from the code...

This would help @andresdominguez, who needs this for protractor docs, which don't provide a @name tag.

Less verbose warn logs

I currently gets logs like these:

warn:    Invalid tags found - doc "QueryParams" (js)  - from file "query-params/query-params-service.js" - starting at line 3, ending at line 9
Line: 3: @ngdoc service...


warn:    Invalid tags found - doc "QueryParams#parse" (js)  - from file "query-params/query-params-service.js" - starting at line 65, ending at line 76
Line: 65: @ngdoc method...


warn:    Invalid tags found - doc "QueryParams#stringify" (js)  - from file "query-params/query-params-service.js" - starting at line 102, ending at line 112
Line: 102: @ngdoc method...



This is subjective, but I think they are too verbose: they use multiple newlines, the "invalid tags found" message is to far away from the "@ngdoc" message, the starting line is logged twice and the ending line isn't that necessary  if you have the starting line . As a comparison this is how TypeErrors are handled natively:

TypeError: Object docs/dgeni.conf.js has no method 'startsWith'
    at /Users/philippzins/Workspace/angular.auth.docs/node_modules/dgeni/bin/gen-docs.js:15:20

Maybe a message like this would be more useful:

warn:    Invalid tags found for QueryParams#stringify (js): '@ngdoc'
    at query-params/query-params-service.js:102

What do you think?

Using preprocessors for file content before getting docs

For example.
We have jsx with jsdoc comments. Before passing file content to jsdocFileReader we should before pass file content through jsx preprocessor.

Now solution look like, create jsxFileReader which will be use jsdocFileReader.
But more sophisticated solution will be something like (IMHO):

readFilesProcessor.sourceFiles = [{
   include: 'js/**/*.jsx',
   fileReader: ['jsxFileReader', 'jsdocFileReader']
}];

What do you think about this?

Nuncjucks templates don't work with ngdoc

I started with your dgeni-example:
https://github.com/petebacondarwin/dgeni-example/

After switching from jsdoc to ngdoc all of my templates were broken.
This was really confusing because I thought the responsibility of the ngdoc package would be the documentation syntax.

However that's not the case the ngdoc package changes how my templates are parsed:
From https://github.com/angular/dgeni-packages/blob/master/ngdoc/index.js

  config.merge('rendering.nunjucks.config.tags', {
    variableStart: '{$',
    variableEnd: '$}'
  });

Please move this configuration into the nunjucks package and add to your documentation that you are not using the http://mozilla.github.io/nunjucks/ template style but your own.

It might be even better to use the template language as intended so users of ngeni can use the nunjucks documentation when writing nunjucks templats

Release New Version?

What's the timeline for releasing a new version of dgeni-packages with the mergableTypes changes?

We're using this in Ionic, and right now we have to pull the dgeni-packages dependency from master, which isn't desirable.

ngdoc -- heavy use of nunjucks->partials good?

At present, docs for Angular code are largely rendered as HTML partials into the docs app.

Thinking out loud here... I wonder if the "balance of power" here (as in, mostly using nunjucks as an HTML generator) is ideal?

Hypothetically, if much more of the documentation information wound up in JSON files, the role of rendering them to HTML could be shifted to Angular directives.

I come to this thought from the perspective of looking at the current Angular docs and starting to think about how in my project I also need to have a single-page rendering (not as in "multipage SPA", but really as in one giant page).

I start to think, well, that one option is to make a completely different set of renderers that would do this. And that may very well be what I should/will end up doing.

However, it strikes me that there's a lot of room in between the current Angular.js docs app and generating a giant HTML page, and that one thing that could -- at least in theory -- be common is that the information gathered in the earlier steps of the dgeni processing could be rendered to JSON files. Such files could be consumed by any Angular app that had some basic ability to present a structured view of the information that is consistent with the overall "schema" that is implied by the (implied) ngdoc specification. If a base Angular app has a set of components that "comprehend" such files, template-based directives could be used to pretty much completely push "up" the question of what the docs app looks like.

In other words, if there was an angular module that knew very well how to consume JSON files that represent ngdocs, that module could be the basis for any arbitrary Angular application to leverage a set of directives to render and otherwise present the information.

I'm not sure if the way I'm expressing this is all that clear, so if this sounds like total nonsense, I can try again, but the short version of an idea I have is:

  • dgeni creates JSON files for consumption by (theoretically any) docs presentation app
  • a angular module is developed that knows all about the format of said JSON files and has some facilities for getting them in and out of memory and navigating their object model, etc.
  • various directives are developed which provide different ways to render the info to browsers

I can see a variety of ways in which this thinking could be countered with issues that it would present, but from the perspective of putting the hands of the docs presentation into angular developers, it seems like it might be one option.

Is the system best as "dgeni with a little angular sprinkled on top"? Or "angular with info parsed by dgeni"? I guess I don't know how you're envisioning it, other than what I see in the present app, which I imagine is somewhat based on earlier incarnations of the angular docs (though I don't know anything about the internals pre-dgeni).

(Just before I am posting this, I took a glance at the Protractor docs for another data point, and it looks like they're pretty much doing what I was trying to describe?)

jsdoc throws error with 2 uses of @see tag.

Using docgen on a copy of webdriver's locators.js. Getting the following error:

error:   Error: Only one of "see" (or its aliases) allowed. There were 2 - doc (js)  - from file "node_modules/selenium-webdriver/lib/webdriver/locators.js" - starting at line 99, ending at line 107
    at readTags (/Users/sjelin/protractor/website/node_modules/dgeni-packages/jsdoc/processors/extract-tags.js:127:15)
    at /Users/sjelin/protractor/website/node_modules/dgeni-packages/jsdoc/processors/extract-tags.js:86:11
    at Function.forEach (/Users/sjelin/protractor/website/node_modules/dgeni-packages/node_modules/lodash/dist/lodash.js:3297:15)
    at tagExtractor (/Users/sjelin/protractor/website/node_modules/dgeni-packages/jsdoc/processors/extract-tags.js:65:9)
    at /Users/sjelin/protractor/website/node_modules/dgeni-packages/jsdoc/processors/extract-tags.js:20:9
    at Array.forEach (native)
    at Object.$process (/Users/sjelin/protractor/website/node_modules/dgeni-packages/jsdoc/processors/extract-tags.js:18:12)
    at Q.then.catch.error.message (/Users/sjelin/protractor/website/node_modules/dgeni/lib/Dgeni.js:202:28)
    at _fulfilled (/Users/sjelin/protractor/website/node_modules/dgeni/node_modules/q/q.js:798:54)
    at self.promiseDispatch.done (/Users/sjelin/protractor/website/node_modules/dgeni/node_modules/q/q.js:827:30)

It's being thrown here. This is weird because it appears that you have set up the see tag to tolerate multiple instances.

Currently using the version of dgeni and dgeni-packages on npm, so this may already be solved in the latest version. If so just give me a sense of when you expect the fix to reach npm. If not I'd like some instruction on how to install the latest version on my machine. Currently executing dgeni from a glup file. Do I have to download both dgeni and dgeni-packages, modify the local copy of dgeni to point to the local copy of dgeni-packages, and then modify my gulp file to point to the local copy of dgeni? Because that seems terrible.

Should @type tag be supported by jsdoc package?

I don't see it listed on the readme and when I try and generate docs I get

Line: 11: @type {{}}...
* Unknown tag: type

After adding it to the tag-defs/index.js it was then of course 'supported' but I'm wondering if and why this particular jsdoc tag isn't supported by default?

Or am I experiencing some bug?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.