ui-thing 0.2.7 → 0.2.9
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/CHANGELOG.md +44 -0
- package/bun.lock +941 -0
- package/dist/index.js +34 -12
- package/dist/index.js.map +1 -1
- package/package.json +33 -31
- package/src/templates/css.ts +23 -1
- package/src/templates/vs-code.ts +6 -6
- package/src/utils/config.ts +2 -1
- package/tsup.config.ts +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ui-thing",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "CLI used to add Nuxt components to a project",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -30,64 +30,66 @@
|
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "tsup",
|
|
33
|
-
"clean": "rm -rf dist coverage node_modules package-lock.json &&
|
|
33
|
+
"clean": "rm -rf dist coverage node_modules bun.lock package-lock.json && bun install",
|
|
34
34
|
"coverage": "vitest run --coverage",
|
|
35
35
|
"dev": "tsup --watch",
|
|
36
36
|
"format": "npx prettier --write .",
|
|
37
37
|
"knip": "knip",
|
|
38
38
|
"knip:fix": "knip --fix",
|
|
39
39
|
"lint": "eslint src",
|
|
40
|
-
"lint-staged": "lint-staged",
|
|
41
40
|
"lint:fix": "eslint src --fix",
|
|
41
|
+
"lint-staged": "lint-staged",
|
|
42
42
|
"prepare": "husky",
|
|
43
|
-
"release": "
|
|
43
|
+
"release": "bun run build && npx changelogen@latest --release && npm publish && git push --follow-tags",
|
|
44
44
|
"start": "node dist/index.js",
|
|
45
45
|
"test": "vitest"
|
|
46
46
|
},
|
|
47
47
|
"lint-staged": {
|
|
48
|
-
"
|
|
49
|
-
"
|
|
48
|
+
"**/*.{ts,js}": [
|
|
49
|
+
"prettier --write",
|
|
50
|
+
"eslint --fix"
|
|
50
51
|
]
|
|
51
52
|
},
|
|
52
53
|
"dependencies": {
|
|
53
|
-
"axios": "^1.
|
|
54
|
+
"axios": "^1.17.0",
|
|
54
55
|
"boxen": "^8.0.1",
|
|
55
|
-
"c12": "^3.3.
|
|
56
|
-
"commander": "^
|
|
56
|
+
"c12": "^3.3.4",
|
|
57
|
+
"commander": "^15.0.0",
|
|
57
58
|
"consola": "^3.4.2",
|
|
58
|
-
"dotenv": "^17.2
|
|
59
|
-
"es-toolkit": "^1.
|
|
59
|
+
"dotenv": "^17.4.2",
|
|
60
|
+
"es-toolkit": "^1.47.0",
|
|
60
61
|
"execa": "^9.6.1",
|
|
61
|
-
"figlet": "^1.
|
|
62
|
-
"fs-extra": "^11.3.
|
|
62
|
+
"figlet": "^1.11.0",
|
|
63
|
+
"fs-extra": "^11.3.5",
|
|
63
64
|
"kleur": "^4.1.5",
|
|
64
|
-
"lodash": "^4.
|
|
65
|
-
"magicast": "^0.5.
|
|
66
|
-
"ora": "^9.
|
|
65
|
+
"lodash": "^4.18.1",
|
|
66
|
+
"magicast": "^0.5.3",
|
|
67
|
+
"ora": "^9.4.0",
|
|
67
68
|
"prompts": "^2.4.2"
|
|
68
69
|
},
|
|
69
70
|
"devDependencies": {
|
|
70
|
-
"@eslint/js": "^
|
|
71
|
-
"@ianvs/prettier-plugin-sort-imports": "^4.7.
|
|
71
|
+
"@eslint/js": "^10.0.1",
|
|
72
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.7.1",
|
|
72
73
|
"@types/fs-extra": "^11.0.4",
|
|
73
|
-
"@types/lodash": "^4.17.
|
|
74
|
-
"@types/node": "^
|
|
74
|
+
"@types/lodash": "^4.17.24",
|
|
75
|
+
"@types/node": "^25.9.2",
|
|
75
76
|
"@types/prompts": "^2.4.9",
|
|
76
|
-
"@vitest/coverage-v8": "^4.
|
|
77
|
-
"@vitest/ui": "^4.
|
|
77
|
+
"@vitest/coverage-v8": "^4.1.8",
|
|
78
|
+
"@vitest/ui": "^4.1.8",
|
|
78
79
|
"axios-mock-adapter": "^2.1.0",
|
|
79
|
-
"eslint": "^
|
|
80
|
-
"globals": "^
|
|
80
|
+
"eslint": "^10.4.1",
|
|
81
|
+
"globals": "^17.6.0",
|
|
81
82
|
"husky": "^9.1.7",
|
|
82
|
-
"jiti": "^2.
|
|
83
|
-
"knip": "^5.
|
|
84
|
-
"lint-staged": "^
|
|
85
|
-
"prettier": "^3.
|
|
83
|
+
"jiti": "^2.7.0",
|
|
84
|
+
"knip": "^5.88.1",
|
|
85
|
+
"lint-staged": "^17.0.7",
|
|
86
|
+
"prettier": "^3.8.4",
|
|
86
87
|
"tsup": "^8.5.1",
|
|
87
|
-
"typescript": "^
|
|
88
|
-
"typescript-eslint": "^8.
|
|
89
|
-
"vitest": "^4.
|
|
88
|
+
"typescript": "^6.0.3",
|
|
89
|
+
"typescript-eslint": "^8.61.0",
|
|
90
|
+
"vitest": "^4.1.8"
|
|
90
91
|
},
|
|
92
|
+
"packageManager": "bun@1.3.9",
|
|
91
93
|
"publishConfig": {
|
|
92
94
|
"access": "public"
|
|
93
95
|
}
|
package/src/templates/css.ts
CHANGED
|
@@ -153,6 +153,28 @@ const CSS_END = `@layer base {
|
|
|
153
153
|
[role="button"]:not(:disabled) {
|
|
154
154
|
cursor: pointer;
|
|
155
155
|
}
|
|
156
|
+
html {
|
|
157
|
+
color-scheme: light dark;
|
|
158
|
+
}
|
|
159
|
+
html.dark {
|
|
160
|
+
color-scheme: dark;
|
|
161
|
+
}
|
|
162
|
+
html.light {
|
|
163
|
+
color-scheme: light;
|
|
164
|
+
}
|
|
165
|
+
@media (prefers-color-scheme: dark) {
|
|
166
|
+
select {
|
|
167
|
+
background-color: var(--popover);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@utility no-scrollbar {
|
|
173
|
+
-ms-overflow-style: none;
|
|
174
|
+
scrollbar-width: none;
|
|
175
|
+
&::-webkit-scrollbar {
|
|
176
|
+
display: none;
|
|
177
|
+
}
|
|
156
178
|
}
|
|
157
179
|
`;
|
|
158
180
|
|
|
@@ -854,7 +876,7 @@ export const BLUE_THEME = `
|
|
|
854
876
|
--popover: oklch(0.21 0.006 285.885);
|
|
855
877
|
--popover-foreground: oklch(0.985 0 0);
|
|
856
878
|
--primary: oklch(0.546 0.245 262.881);
|
|
857
|
-
--primary-foreground: oklch(0.
|
|
879
|
+
--primary-foreground: oklch(0.98 0.0067 277.16);
|
|
858
880
|
--secondary: oklch(0.274 0.006 286.033);
|
|
859
881
|
--secondary-foreground: oklch(0.985 0 0);
|
|
860
882
|
--muted: oklch(0.274 0.006 286.033);
|
package/src/templates/vs-code.ts
CHANGED
|
@@ -8,7 +8,6 @@ export const VS_CODE_RECOMMENDATIONS = {
|
|
|
8
8
|
"antfu.iconify",
|
|
9
9
|
"formulahendry.auto-close-tag",
|
|
10
10
|
"formulahendry.auto-rename-tag",
|
|
11
|
-
"prettier.prettier-vscode",
|
|
12
11
|
],
|
|
13
12
|
};
|
|
14
13
|
|
|
@@ -22,11 +21,12 @@ export const VS_CODE_SETTINGS = {
|
|
|
22
21
|
"tailwindCSS.classFunctions": ["tw", "clsx", "tw\\.[a-z-]+"],
|
|
23
22
|
"tailwindCSS.experimental.classRegex": [
|
|
24
23
|
[
|
|
25
|
-
"
|
|
26
|
-
'"
|
|
24
|
+
"\\btv\\(\\s*((?:\"(?:\\\\.|[^\"\\\\])*\"|'(?:\\\\.|[^'\\\\])*'|`(?:\\\\.|[^`\\\\])*`|[^)]*)*)\\)",
|
|
25
|
+
"[\"']([^\"']*)[\"']",
|
|
26
|
+
],
|
|
27
|
+
[
|
|
28
|
+
"\\btv\\(\\s*((?:\"(?:\\\\.|[^\"\\\\])*\"|'(?:\\\\.|[^'\\\\])*'|`(?:\\\\.|[^`\\\\])*`|[^)]*)*)\\)",
|
|
29
|
+
"`([^`]*)`",
|
|
27
30
|
],
|
|
28
|
-
"tw`(.*?)`",
|
|
29
|
-
"tw\\('(.*?)'\\)",
|
|
30
|
-
"tw\\(\\s*('(.*?)'|\"(.*?)\")\\s*\\)",
|
|
31
31
|
],
|
|
32
32
|
};
|
package/src/utils/config.ts
CHANGED
|
@@ -18,7 +18,8 @@ const currentDir = process.cwd();
|
|
|
18
18
|
*/
|
|
19
19
|
export const getUIConfig = async (options?: InitOptions): Promise<UIConfig> => {
|
|
20
20
|
const configExists = fse.existsSync(UI_CONFIG_FILENAME);
|
|
21
|
-
|
|
21
|
+
// eslint-disable-next-line no-useless-assignment
|
|
22
|
+
let uiConfig = {} as UIConfig;
|
|
22
23
|
const nuxtVersion = Number(options?.nuxtVersion) || detectNuxtVersion();
|
|
23
24
|
|
|
24
25
|
// Force creation or first-time setup
|
package/tsup.config.ts
CHANGED