artharexian-ui 0.3.0 → 0.3.2
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/cli/index.mjs +8 -0
- package/package.json +1 -1
package/cli/index.mjs
CHANGED
|
@@ -95,6 +95,14 @@ function copyDir(src, dest) {
|
|
|
95
95
|
// Add component from GitHub
|
|
96
96
|
async function addComponent(componentName) {
|
|
97
97
|
const destDir = path.resolve(cwd, 'src/components/ui', componentName)
|
|
98
|
+
const stylesPath = path.resolve(cwd, 'src/styles')
|
|
99
|
+
|
|
100
|
+
// Auto-install styles if not present
|
|
101
|
+
if (!fs.existsSync(stylesPath)) {
|
|
102
|
+
console.log('Styles not found. Installing...\n')
|
|
103
|
+
await copyStyles()
|
|
104
|
+
console.log('')
|
|
105
|
+
}
|
|
98
106
|
|
|
99
107
|
console.log(`Fetching ${componentName} from GitHub...`)
|
|
100
108
|
|