@leanup/cli
Version:
This CLI brings along all required tools to serve, test and build multi framework SPAs
37 lines • 1.64 kB
JavaScript
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "path", "./common-cli"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LeanupCLI = void 0;
const path = require("path");
const common_cli_1 = require("./common-cli");
class LeanupCLI extends common_cli_1.CommonCLI {
constructor(name, version) {
super(name, version);
this.addActionToCommand('create', (options) => {
this.copyAndPrint(path.join(__dirname, '../template'), '', options);
['e2e', 'format', 'lint', 'test'].forEach((plugin) => {
try {
this.copyAndPrint(path.join(require(`@leanup/cli-core-${plugin}`), 'template'), '', options);
}
catch (error) { }
});
['cli-addons', 'cli-cucumber', 'cli-graphql', 'cli-pwa', 'cli-webhint', 'git-hooks'].forEach((plugin) => {
try {
this.copyAndPrint(path.join(require(`@leanup/${plugin}`), 'template'), '', Object.assign(Object.assign({}, options), { overwrite: true }));
}
catch (error) { }
});
});
}
}
exports.LeanupCLI = LeanupCLI;
});
//# sourceMappingURL=leanup-cli.js.map