@bconnorwhite/bob
Version:
Bob is a toolkit for TypeScript projects
41 lines (28 loc) • 1.95 kB
JavaScript
;
exports.__esModule = true;
exports.watch = watch;
exports.watchAction = watchAction;
exports["default"] = void 0;
var _commanderVersion = require("commander-version");
var _build = require("../build");
var _source = _interopRequireWildcard(require("./source"));
exports.watchSourceCommand = _source["default"];
exports.watchSourceAction = _source.watchSourceAction;
exports.watchSource = _source.watchSource;
var _types = _interopRequireWildcard(require("./types"));
exports.watchTypesCommand = _types["default"];
exports.watchTypesAction = _types.watchTypesAction;
exports.watchTypes = _types.watchTypes;
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function watch() {
return (0, _build.build)({
watch: true,
silent: false
});
}
function watchAction() {
watch();
}
var _default = (0, _commanderVersion.createCommand)("watch").description("watch source files and build after changes").addCommand(_source["default"]).addCommand(_types["default"]).action(watchAction);
exports["default"] = _default;