rxn-ui 0.5.2 → 0.5.4
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 +0 -3
- package/cli/utils/config.js +25 -33
- package/package.json +1 -1
package/cli/index.mjs
CHANGED
|
@@ -8,7 +8,6 @@ import { detectProject, loadConfig, saveConfig } from './utils/config.js'
|
|
|
8
8
|
import { fetchFile, fetchJSON } from './utils/fetch.js'
|
|
9
9
|
import { colors, error, info, log, success } from './utils/logger.js'
|
|
10
10
|
|
|
11
|
-
// GitHub repository info
|
|
12
11
|
const GITHUB_REPO = 'r2-h/artharexian-ui'
|
|
13
12
|
const GITHUB_RAW = `https://raw.githubusercontent.com/${GITHUB_REPO}/main`
|
|
14
13
|
|
|
@@ -115,8 +114,6 @@ async function add(name, cmdOptions = {}) {
|
|
|
115
114
|
await downloadStyles(stylesDir, tag)
|
|
116
115
|
showDependencies(entry)
|
|
117
116
|
|
|
118
|
-
success(`${name} added successfully`)
|
|
119
|
-
|
|
120
117
|
if (entry.imports) {
|
|
121
118
|
log(`\n${colors.bold}Usage:${colors.reset}`)
|
|
122
119
|
for (const imp of entry.imports) {
|
package/cli/utils/config.js
CHANGED
|
@@ -1,33 +1,25 @@
|
|
|
1
|
-
import fs from 'node:fs'
|
|
2
|
-
import path from 'node:path'
|
|
3
|
-
|
|
4
|
-
const cwd = process.env.INIT_CWD || process.cwd()
|
|
5
|
-
|
|
6
|
-
export function loadConfig() {
|
|
7
|
-
const configPath = path.join(cwd, 'rxn-ui.json')
|
|
8
|
-
if (!fs.existsSync(configPath)) {
|
|
9
|
-
return null
|
|
10
|
-
}
|
|
11
|
-
return JSON.parse(fs.readFileSync(configPath, 'utf8'))
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function saveConfig(config) {
|
|
15
|
-
const configPath = path.join(cwd, 'rxn-ui.json')
|
|
16
|
-
fs.writeFileSync(configPath, JSON.stringify(config, null, 2))
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function detectProject() {
|
|
20
|
-
const hasSrc = fs.existsSync(path.join(cwd, 'src'))
|
|
21
|
-
return {
|
|
22
|
-
components: hasSrc ? 'src/shared/components' : 'components',
|
|
23
|
-
styles: hasSrc ? 'src/app/styles' : 'styles',
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
aliases: {
|
|
27
|
-
'@': '.',
|
|
28
|
-
'@components': hasSrc ? 'src/shared/components' : 'components',
|
|
29
|
-
'@styles': hasSrc ? 'src/app/styles' : 'styles',
|
|
30
|
-
},
|
|
31
|
-
>>>>>>> 5ad45b5eea21858c41198b6c8c3bfd2d6ce8f182
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
|
|
4
|
+
const cwd = process.env.INIT_CWD || process.cwd()
|
|
5
|
+
|
|
6
|
+
export function loadConfig() {
|
|
7
|
+
const configPath = path.join(cwd, 'rxn-ui.json')
|
|
8
|
+
if (!fs.existsSync(configPath)) {
|
|
9
|
+
return null
|
|
10
|
+
}
|
|
11
|
+
return JSON.parse(fs.readFileSync(configPath, 'utf8'))
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function saveConfig(config) {
|
|
15
|
+
const configPath = path.join(cwd, 'rxn-ui.json')
|
|
16
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2))
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function detectProject() {
|
|
20
|
+
const hasSrc = fs.existsSync(path.join(cwd, 'src'))
|
|
21
|
+
return {
|
|
22
|
+
components: hasSrc ? 'src/shared/components' : 'components',
|
|
23
|
+
styles: hasSrc ? 'src/app/styles' : 'styles',
|
|
24
|
+
}
|
|
25
|
+
}
|