npmize
Version:
Let's create an npm package without worrying about anything.
15 lines (14 loc) • 545 B
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const cross_spawn_1 = __importDefault(require("cross-spawn"));
function default_1(cwd, args, options = {}) {
const runner = options.async ? cross_spawn_1.default : cross_spawn_1.default.sync;
runner('npx', ['tsc', ...args], {
stdio: options.stdio || 'inherit',
cwd,
});
}
;