UNPKG

@clscripts/ts-patch

Version:

ts-patch (tspc) clscripts implementation

37 lines 1.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TsPatch = void 0; class TsPatch { constructor(opts = {}) { this.packageExecutable = 'tspc'; this.tsconfigPath = opts.tsconfigPath; this.watch = opts.watch; this.noEmit = opts.noEmit; this.preserveWatchOutput = opts.preserveWatchOutput; } get tsconfigPathArg() { return this.tsconfigPath ? `-p ${this.tsconfigPath}` : ''; } get watchArg() { return this.watch ? `--watch` : ''; } get noEmitArg() { return this.noEmit ? `--noEmit` : ''; } get preserveWatchOutputArg() { return this.preserveWatchOutput ? '--preserveWatchOutput' : ''; } get command() { return [ this.packageExecutable, this.tsconfigPathArg, this.watchArg, this.noEmitArg, this.preserveWatchOutputArg, ] .filter(Boolean) .join(' '); } } exports.TsPatch = TsPatch; //# sourceMappingURL=script.js.map