npm-submodules
Version:
Simple way to manage typescipt and angular2 submodules from one repository
30 lines (29 loc) • 1.04 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const execa = require('execa');
const Listr = require("listr");
const tasks_1 = require("../tasks");
const utils_1 = require("../utils");
function npmDistTagRun(cli) {
const { project, verbose, yarn } = cli.flags;
const cmd = cli.input[1];
const tag = cli.input[2];
return utils_1.findSubmodules(project)
.then((opts) => {
const tasks = new Listr([
{
title: 'Version all submodules',
task: () => new Listr(opts.map(opt => ({
title: `npm dist-tag ${cmd} ${opt.pkg.name}@${opt.pkg.version}`,
task: () => tasks_1.npmDistTag({
yarn, cmd, tag,
module: opt.pkg.name,
version: opt.pkg.version
})
})))
}
], { renderer: verbose ? 'verbose' : 'default' });
return tasks.run();
});
}
exports.npmDistTagRun = npmDistTagRun;
;