Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);