rxn-ui 0.5.0 → 0.5.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.
Files changed (2) hide show
  1. package/cli/utils/config.js +33 -30
  2. package/package.json +2 -2
@@ -1,30 +1,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
- aliases: {
25
- '@': '.',
26
- '@components': hasSrc ? 'src/shared/components' : 'components',
27
- '@styles': hasSrc ? 'src/app/styles' : 'styles',
28
- },
29
- }
30
- }
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
+ <<<<<<< HEAD
25
+ =======
26
+ aliases: {
27
+ '@': '.',
28
+ '@components': hasSrc ? 'src/shared/components' : 'components',
29
+ '@styles': hasSrc ? 'src/app/styles' : 'styles',
30
+ },
31
+ >>>>>>> 5ad45b5eea21858c41198b6c8c3bfd2d6ce8f182
32
+ }
33
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rxn-ui",
3
3
  "description": "Vue 3 UI component library",
4
- "version": "0.5.0",
4
+ "version": "0.5.2",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "type": "module",
@@ -11,7 +11,7 @@
11
11
  "url": "git+https://github.com/r2-h/artharexian-ui.git"
12
12
  },
13
13
  "bin": {
14
- "rxn-ui": "./cli/index.mjs"
14
+ "rxn-ui": "cli/index.mjs"
15
15
  },
16
16
  "files": [
17
17
  "cli"