@airbnb/nimbus
Version:
Centralized CLI for JavaScript and TypeScript dev tools.
22 lines (21 loc) • 711 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const execa_1 = __importDefault(require("execa"));
async function installDeps(deps, isYarn = false, isMonorepo = false) {
const args = [];
if (isYarn) {
args.push('--dev', '--no-progress');
if (isMonorepo) {
args.push('-W');
}
await execa_1.default('yarn', ['add', ...args, ...deps]);
}
else {
args.push('--save-dev');
await execa_1.default('npm', ['install', ...args, ...deps]);
}
}
exports.default = installDeps;