rxn-ui 0.4.5 → 0.4.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/cli/index.mjs +2 -10
- package/package.json +1 -1
package/cli/index.mjs
CHANGED
|
@@ -31,12 +31,6 @@ function detectProject() {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
function hasStyles(stylesPath) {
|
|
35
|
-
// Проверяет, есть ли уже файлы стилей в проекте
|
|
36
|
-
if (!fs.existsSync(stylesPath)) return false
|
|
37
|
-
return fs.readdirSync(stylesPath).some(f => f.endsWith('.css'))
|
|
38
|
-
}
|
|
39
|
-
|
|
40
34
|
function copyFiles(srcDir, destDir, files) {
|
|
41
35
|
// Копирует указанные файлы из srcDir в destDir (только отсутствующие)
|
|
42
36
|
fs.mkdirSync(destDir, { recursive: true })
|
|
@@ -84,11 +78,9 @@ function add(name) {
|
|
|
84
78
|
const dest = path.join(cwd, config.components, name)
|
|
85
79
|
copyFiles(src, dest, entry.files)
|
|
86
80
|
|
|
87
|
-
// Копируем
|
|
81
|
+
// Копируем стили
|
|
88
82
|
const stylesDest = path.join(cwd, config.styles)
|
|
89
|
-
|
|
90
|
-
copyFiles(STYLES_DIR, stylesDest, fs.readdirSync(STYLES_DIR))
|
|
91
|
-
}
|
|
83
|
+
copyFiles(STYLES_DIR, stylesDest, fs.readdirSync(STYLES_DIR))
|
|
92
84
|
|
|
93
85
|
console.log(`\n✔ ${name} added`)
|
|
94
86
|
}
|