How to use the dgeni.loadConfig 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
gulp.task('docs', function() {
    var docVersion = argv['doc-version'] || 'nightly';
    if (docVersion != 'nightly' && !semver.valid(docVersion)) {
      console.log('Usage: gulp docs --doc-version=(nightly|versionName)');
      return process.exit(1);
    }

    var config = dgeni.loadConfig(path.resolve(projectRoot, 'config/docs/docs.config.js'));
    config.set('currentVersion', docVersion);
    config.set(
      'rendering.outputFolder',
      argv.dist ? argv.dist : path.resolve(projectRoot, '..', 'ionic-site')
    );

    return dgeni.generator(config)().then(function() {
      gutil.log('Docs for', gutil.colors.cyan(docVersion), 'generated!');
    });
  });
github ionic-team / ionic-v1 / config / gulp-tasks / docs.js View on Github external
gulp.task('demos', function(done) {
    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 + '/' +

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