How to use the dgeni.generator 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-v1 / config / gulp-tasks / docs.js View on Github external
var demoVersion = argv['demo-version'] || 'nightly';
    if (demoVersion != 'nightly' && !semver.valid(demoVersion)) {
      console.log('Usage: gulp docs --doc-version=(nightly|versionName)');
      return process.exit(1);
    }

    var config = dgeni.loadConfig(path.resolve(projectRoot, 'config/demos/demos.config.js'));
    config.set('currentVersion', demoVersion);
    config.set('dist', buildConfig.dist);
    config.set(
      'rendering.outputFolder',
      argv.dist ? argv.dist : path.resolve(projectRoot, buildConfig.dist, 'nightly')
    );
    config.set('demoFolderPrefix', argv.release ? '' : '/dist/ionic-demo');

    dgeni.generator(config)().then(function() {
      gutil.log('Demos for', gutil.colors.cyan(demoVersion), 'generated!');
      gutil.log('Building ionic into demo folder...');
      cp.spawn('node', [
        projectRoot + '/node_modules/.bin/gulp',
        'build',
        argv.release ? '--release' : '--no-release',
        '--dist=' + config.rendering.outputFolder + '/' +
          config.rendering.contentsFolder + '/ionic'
      ])
      .on('exit', done);
    });
  });
github Famous / famous-angular / gulpfile.js View on Github external
semver = require('semver'),
    argv = require('minimist')(process.argv.slice(2)),
    docVersion = argv['doc-version'];

  if (docVersion != 'unstable' && !semver.valid(docVersion)) {
    console.log('Usage: gulp docs --doc-version=(unstable|versionName)');
    if(pkg.version) {
      console.log('Current package.json version is: '+pkg.version);
    }
    console.log('No version selected, using unstable');
    docVersion = 'unstable';
  }
  process.env.DOC_VERSION = docVersion;

  gutil.log('Generating documentation for ', gutil.colors.cyan(docVersion));
  var generateDocs = dgeni.generator('docs-generation/docs.config.js');
  return generateDocs().then(function() {
    gutil.log('Docs for', gutil.colors.cyan(docVersion), 'generated!');
  });
});

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