How to use the dgeni.Package function in dgeni

To help you get started, we’ve selected a few dgeni examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ionic-team / ionic / packages / ionic-angular / scripts / docs / dgeni-config.js View on Github external
module.exports = function(currentVersion, initialVersionBuild) {

  return new Package('ionic-v2-docs',
                     [jsdocPackage, nunjucksPackage, typescriptPackage,
                      linksPackage, gitPackage])

.processor(require('./processors/latest-version'))
.processor(require('./processors/index-page'))
.processor(require('./processors/remove-private-members'))
.processor(require('./processors/jekyll'))
.processor(require('./processors/hide-private-api'))
.processor(require('./processors/collect-inputs-outputs'))
.processor(require('./processors/parse-returns-object'))
.processor(require('./processors/parse-optional'))
.processor(require('./processors/parse-sass'))

// for debugging docs
// .processor(function test(){
//   return {
github angular / angular / docs / typescript-package / index.js View on Github external
var basePackage = require('dgeni-packages/base');
var jsdocPackage = require('dgeni-packages/jsdoc');
var Package = require('dgeni').Package;
var path = require('canonical-path');

// Define the dgeni package for generating the docs
module.exports = new Package('typescript-parsing', [basePackage, jsdocPackage])

// Register the services and file readers
.factory(require('./services/modules'))
.factory(require('./services/tsParser'))
.factory(require('./services/tsParser/createCompilerHost'))
.factory(require('./services/tsParser/getFileInfo'))
.factory(require('./services/tsParser/getExportDocType'))
.factory(require('./services/tsParser/getContent'))

.factory(require('./services/convertPrivateClassesToInterfaces'))

.factory('EXPORT_DOC_TYPES', function() {
  return [
    'class',
    'interface',
    'function',
github xjsframework / xjs / docs / typescript-package / index.js View on Github external
var basePackage = require('dgeni-packages/base');
var jsdocPackage = require('dgeni-packages/jsdoc');
var Package = require('dgeni').Package;
var path = require('canonical-path');

// Define the dgeni package for generating the docs
module.exports = new Package('typescript-parsing', [basePackage, jsdocPackage])

// Register the services and file readers
.factory(require('./services/modules'))
.factory(require('./services/tsParser'))
.factory(require('./services/tsParser/createCompilerHost'))
.factory(require('./services/tsParser/getFileInfo'))
.factory(require('./services/tsParser/getExportDocType'))
.factory(require('./services/tsParser/getContent'))

.factory(require('./services/convertPrivateClassesToInterfaces'))

.factory('EXPORT_DOC_TYPES', function() {
  return [
    'class',
    'interface',
    'function',
github angular / protractor / website / docgen / dgeni-config.js View on Github external
tagDefs.push({name: 'view'});
  tagDefs.push({name: 'template'});
  tagDefs.push({name: 'fileoverview'});
  tagDefs.push({name: 'const'});
  tagDefs.push({name: 'throws'});
  tagDefs.push({name: 'typedef'});
  tagDefs.push({name: 'override'});
  tagDefs.push({name: 'implements'});
  tagDefs.push({name: 'final'});

  // The name tag should not be required.
  var nameTag = _.find(tagDefs, {name: 'name'});
  nameTag.required = false;
});

var myPackage = new Package('myPackage', [
  jsDocProcessor,
  require('dgeni-packages/nunjucks')
]);

// Handle Inline Tags
myPackage.factory(require('./inline_tags/code'))
    .config(function(inlineTagProcessor, codeTagDef) {
      inlineTagProcessor.inlineTagDefinitions.push(codeTagDef);
    });

/*
 * Add a couple of processors to the pipe to do extra parsing and rendering.
 * Note that the order in which these are included is very important.
 *
 * tag-fixer: Get the name of the function, format the @param and @return
 *     annotations to prepare them for rendering.
github ngmobie / mobie / docs / config / index.js View on Github external
// Canonical path provides a consistent path (i.e. always forward slashes) across different OSes
var path = require('canonical-path');

var Package = require('dgeni').Package;

// Create and export a new Dgeni package called dgeni-example. This package depends upon
// the jsdoc and nunjucks packages defined in the dgeni-packages npm module.
module.exports = new Package('mobie', [
  require('dgeni-packages/ngdoc'),
  require('dgeni-packages/nunjucks'),
  require('dgeni-packages/examples')
])

.factory(require('./services/deployments/default'))

.processor(require('./processors/module-docs'))
.processor(require('./processors/index-page'))
.processor(require('./processors/pages-data'))

.config(function (renderDocsProcessor) {
  renderDocsProcessor.extraData.git = {
    version: {
      branch: 'master',
      isSnapshot: true
github 3DGenomes / TADkit / docs / config / index.js View on Github external
var path = require('canonical-path');
var packagePath = __dirname;

var Package = require('dgeni').Package;

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

.processor(require('./index-page'))

.config(function(log, readFilesProcessor, writeFilesProcessor) {

    // Set the log level to 'info', switch to 'debug' when troubleshooting
    log.level = 'info';

    // Specify the base path used when resolving relative paths to source and output files
    readFilesProcessor.basePath = path.resolve(packagePath, '../..');

    // Specify the source files to extract
github devconcept / ng-shopping-cart / docs / api-package / index.js View on Github external
/* eslint-disable no-template-curly-in-string */
/* eslint-disable prefer-arrow-callback */

const {Package} = require('dgeni');
const tsPkg = require('dgeni-packages/typescript');
const cartBasePkg = require('../base-package/index');

const {TYPESCRIPT_SOURCES, ASSETS} = require('../config');

module.exports = exports = new Package('cartApi', [cartBasePkg, tsPkg])
  .processor(require('./processors/filterUnusedDocs'))
  .processor(require('./processors/filterIgnoredFiles'))
  .processor(require('./processors/generateKebabNames'))
  .processor(require('./processors/computeNgType'))
  .processor(require('./processors/addTypeParameters'))
  .processor(require('./processors/addServiceDependencies'))
  .processor(require('./processors/generateApiModules'))
  .processor(require('./processors/fixHeritageInfo'))
  .processor(require('./processors/fixMembersType'))
  .processor(require('./processors/generateApiRoutes'))
  .processor(require('./processors/generateSearchService'))
  .processor(require('./processors/generateBadgeInfo'))
  .factory(require('./services/getTypeFolder'))
  .config(function(parseTagsProcessor, getInjectables) {
    parseTagsProcessor.tagDefinitions = [
      ...parseTagsProcessor.tagDefinitions,
github angular / angular / docs / docs-package / mocks / mockPackage.js View on Github external
module.exports = function mockPackage() {

  return new Package('mockPackage', [require('../')])

  // provide a mock log service
  .factory('log', function() { return require('dgeni/lib/mocks/log')(false); });

};
github ionic-team / ionic / scripts / docs / links-package / index.js View on Github external
var Package = require('dgeni').Package;

module.exports = new Package('links', [])

.factory(require('./inline-tag-defs/link'))
.factory(require('dgeni-packages/links/services/getAliases'))
.factory(require('dgeni-packages/links/services/getDocFromAlias'))
.factory(require('./services/getLinkInfo'))

.config(function(inlineTagProcessor, linkInlineTagDef) {
  inlineTagProcessor.inlineTagDefinitions.push(linkInlineTagDef);
});
github angular / material / docs / config / index.js View on Github external
const path = require('canonical-path');
const Package = require('dgeni').Package;

const projectPath = path.resolve(__dirname, '../..');
const packagePath = __dirname;

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

.processor(require('./processors/componentsData'))
.processor(require('./processors/indexPage'))
.processor(require('./processors/buildConfig'))
.processor(require('./processors/content'))

.config(function(log, templateEngine, templateFinder) {

  templateFinder.templateFolders = [
    path.resolve(packagePath, 'template'),
    path.resolve(packagePath, 'template/ngdoc'),
    path.resolve(packagePath, '../app-template')
  ];

dgeni

Flexible JavaScript documentation generator used by both AngularJS and Angular

MIT
Latest version published 4 years ago

Package Health Score

60 / 100
Full package analysis