How to use @jsdoc/task-runner - 1 common examples

To help you get started, we’ve selected a few @jsdoc/task-runner 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 hegemonic / jsdoc-baseline / publish.js View on Github external
exports.publish = async (taffyData, options, tutorials) => {
    const templateConfig = config.loadSync().get();
    const allConfig = _.defaults({}, {
        templates: {
            baseline: templateConfig
        }
    }, options, { opts: env.opts });
    const context = {
        config: allConfig,
        templateConfig
    };
    const docletHelper = new DocletHelper();
    // TODO: Stop passing context to constructor when that's possible.
    const runner = new TaskRunner(context);

    // set up tutorials
    helper.setTutorials(tutorials);

    docletHelper.addDoclets(taffyData);
    // TODO: Replicate this logic when `DocletHelper` goes away:
    // helper.prune(taffyData);
    // taffyData.sort('longname, version, since');
    // TODO: Do all of this in the `setContext` task.
    context.doclets = db({
        config: allConfig,
        values: docletHelper.allDoclets
    });
    context.sourceFiles = docletHelper.shortPaths;

    runner.addTasks(tasks);

@jsdoc/task-runner

Task runner for JSDoc templates.

Apache-2.0
Latest version published 1 month ago

Package Health Score

77 / 100
Full package analysis

Popular @jsdoc/task-runner functions