@zohodesk/client_build_tool
Version:
A CLI tool to build web applications and client libraries
33 lines (27 loc) • 696 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.commandExecutor = commandExecutor;
var _constants = require("../../shared/constants");
var _watchRun = require("../../shared/fileUtils/watchRun");
function commandExecutor(options) {
const {
extraArgs = []
} = options;
const index = extraArgs.indexOf('-w');
const canWatch = index !== -1;
if (canWatch) {
extraArgs.splice(index, 1);
}
let [src, target] = extraArgs;
src = (0, _constants.joinWithAppPath)(src || 'src');
target = (0, _constants.joinWithAppPath)(target || 'lib');
(0, _watchRun.watchRun)({
options,
src,
target,
canWatch,
mode: 'lib'
});
}