@nx-extend/shadcn-ui
Version:
<a href="https://www.npmjs.com/package/@nx-extend/shadcn-ui" rel="nofollow"> <img src="https://badgen.net/npm/v/@nx-extend/shadcn-ui" alt="@nx-extend/shadcn-ui NPM package"> </a>
25 lines • 1.03 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.addExecutor = addExecutor;
const tslib_1 = require("tslib");
const devkit_1 = require("@nx/devkit");
const core_1 = require("@nx-extend/core");
const child_process_1 = require("child_process");
function addExecutor(options) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
var _a;
(0, child_process_1.execSync)((0, core_1.buildCommand)([
(0, core_1.getPackageManagerDlxCommand)(),
'shadcn@latest add',
((_a = options.component) !== null && _a !== void 0 ? _a : '').length === 0 ? '--all' : options.component,
options.overwrite && '--overwrite'
]), {
cwd: devkit_1.workspaceRoot,
env: Object.assign(Object.assign({}, process.env), { TS_NODE_PROJECT: 'tsconfig.base.json' }),
stdio: 'inherit'
});
return { success: true };
});
}
exports.default = addExecutor;
//# sourceMappingURL=add.impl.js.map
;