typescript-assistant
Version:
Combines and integrates professional Typescript tools into your project
27 lines • 1.04 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createAssistCommand = void 0;
function createAssistCommand(deps) {
const { formatter, linter, compiler, nyc, server, watcher } = deps;
return {
execute(options = {}) {
const { format = true, coverage = true, projects, testConfig, testsGlob, } = options;
watcher.watchSourceFileChanged();
if (options.statusServerPort) {
server.start(options.statusServerPort);
}
if (format) {
formatter.startVerifying(["source-files-changed"]);
linter.start("format-verified");
}
else {
linter.start("source-files-changed", true);
}
nyc.start(["source-files-changed"], coverage, testConfig, testsGlob);
compiler.start(projects);
return Promise.resolve(true);
},
};
}
exports.createAssistCommand = createAssistCommand;
//# sourceMappingURL=assist.js.map