@tsed/cli-core
Version:
Build your CLI with TypeScript and Decorators
27 lines (26 loc) • 846 B
JavaScript
import { __decorate } from "tslib";
import { Injectable } from "@tsed/di";
import { Observable } from "rxjs";
import { BaseManager } from "./BaseManager.js";
let NpmManager = class NpmManager extends BaseManager {
constructor() {
super(...arguments);
this.name = "npm";
this.cmd = "npm";
}
add(deps, options) {
return this.run("install", ["--no-production", "--legacy-peer-deps", "--save", ...deps], options);
}
addDev(deps, options) {
return this.run("install", ["--no-production", "--legacy-peer-deps", "--save-dev", ...deps], options);
}
install(options) {
return this.run("install", ["--no-production", "--legacy-peer-deps"], options);
}
};
NpmManager = __decorate([
Injectable({
type: "package:manager"
})
], NpmManager);
export { NpmManager };