cus-base-ui 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/ui-cli.ts +11 -0
package/package.json
CHANGED
package/scripts/ui-cli.ts
CHANGED
|
@@ -359,6 +359,17 @@ const main = async () => {
|
|
|
359
359
|
error('Usage: npx cus-base-ui add <component-name> [--force]');
|
|
360
360
|
return;
|
|
361
361
|
}
|
|
362
|
+
|
|
363
|
+
// Auto-init if not yet initialized
|
|
364
|
+
const cnPath = path.join(cwd, 'src/lib/utils/cn.ts');
|
|
365
|
+
if (!fs.existsSync(cnPath)) {
|
|
366
|
+
log('Project not initialized — running init first...');
|
|
367
|
+
setupViteConfig(cwd);
|
|
368
|
+
setupTsConfig(cwd);
|
|
369
|
+
ensureTailwindCss(cwd);
|
|
370
|
+
installNpmPackages(RUNTIME_PACKAGES, cwd);
|
|
371
|
+
}
|
|
372
|
+
|
|
362
373
|
for (const name of componentNames) {
|
|
363
374
|
addComponent(name, registry, cwd, { force: isForce });
|
|
364
375
|
}
|