sh-ui-cli 0.85.1 → 0.86.1
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/data/changelog/versions.json +24 -0
- package/package.json +1 -1
- package/src/constants.js +1 -1
- package/src/create/architectures/archSchema.js +1 -1
- package/src/create/architectures/flat.js +1 -1
- package/src/create/architectures/fsd.js +1 -1
- package/src/create/describeTemplate.js +21 -2
- package/src/create/generator.js +86 -3
- package/src/create/templateManifest.js +49 -0
- package/src/mcp.mjs +4 -4
- package/templates/nextjs-standalone/package.json +1 -0
- package/templates/vite-standalone/CLAUDE.md +7 -0
- package/templates/vite-standalone/README.md +23 -0
- package/templates/vite-standalone/_arch/flat/sh-ui.config.json +22 -0
- package/templates/vite-standalone/_arch/flat/src/App.tsx +13 -0
- package/templates/vite-standalone/_arch/flat/src/components/layouts/RootLayout.tsx +5 -0
- package/templates/vite-standalone/_arch/flat/src/components/providers/GlobalProvider/index.tsx +13 -0
- package/templates/vite-standalone/_arch/flat/src/components/providers/index.tsx +1 -0
- package/templates/vite-standalone/_arch/flat/src/components/providers/theme/ThemeProvider.tsx +59 -0
- package/templates/vite-standalone/_arch/flat/src/lib/api/queryClient.ts +12 -0
- package/templates/vite-standalone/_arch/flat/src/lib/hooks/useTheme.ts +8 -0
- package/templates/vite-standalone/_arch/flat/src/lib/styles/globals.css +35 -0
- package/templates/vite-standalone/_arch/flat/src/lib/styles/tokens.css +203 -0
- package/templates/vite-standalone/_arch/flat/src/lib/utils/utils.ts +6 -0
- package/templates/vite-standalone/_arch/flat/src/main.tsx +10 -0
- package/templates/vite-standalone/_arch/flat/tsconfig.app.json +23 -0
- package/templates/vite-standalone/_arch/fsd/sh-ui.config.json +22 -0
- package/templates/vite-standalone/_arch/fsd/src/App.tsx +13 -0
- package/templates/vite-standalone/_arch/fsd/src/app/layouts/RootLayout.tsx +5 -0
- package/templates/vite-standalone/_arch/fsd/src/app/providers/GlobalProvider/index.tsx +13 -0
- package/templates/vite-standalone/_arch/fsd/src/app/providers/theme/ThemeProvider.tsx +59 -0
- package/templates/vite-standalone/_arch/fsd/src/main.tsx +10 -0
- package/templates/vite-standalone/_arch/fsd/src/shared/api/queryClient.ts +12 -0
- package/templates/vite-standalone/_arch/fsd/src/shared/hooks/useTheme.ts +8 -0
- package/templates/vite-standalone/_arch/fsd/src/shared/lib/utils.ts +6 -0
- package/templates/vite-standalone/_arch/fsd/src/shared/styles/globals.css +35 -0
- package/templates/vite-standalone/_arch/fsd/src/shared/styles/tokens.css +203 -0
- package/templates/vite-standalone/_arch/fsd/tsconfig.app.json +22 -0
- package/templates/vite-standalone/eslint.config.js +34 -0
- package/templates/vite-standalone/gitignore +8 -0
- package/templates/vite-standalone/index.html +22 -0
- package/templates/vite-standalone/package.json +64 -0
- package/templates/vite-standalone/src/App.tsx +5 -0
- package/templates/vite-standalone/src/Home.tsx +7 -0
- package/templates/vite-standalone/src/main.tsx +9 -0
- package/templates/vite-standalone/tsconfig.json +7 -0
- package/templates/vite-standalone/tsconfig.node.json +12 -0
- package/templates/vite-standalone/vite.config.ts +11 -0
- package/templates/vite-standalone/vitest.config.ts +13 -0
- package/templates/vite-standalone/vitest.setup.ts +1 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import js from '@eslint/js';
|
|
2
|
+
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
3
|
+
import onlyWarn from 'eslint-plugin-only-warn';
|
|
4
|
+
import pluginReact from 'eslint-plugin-react';
|
|
5
|
+
import pluginReactHooks from 'eslint-plugin-react-hooks';
|
|
6
|
+
import globals from 'globals';
|
|
7
|
+
import tseslint from 'typescript-eslint';
|
|
8
|
+
|
|
9
|
+
export default [
|
|
10
|
+
{ ignores: ['dist/**', 'node_modules/**'] },
|
|
11
|
+
js.configs.recommended,
|
|
12
|
+
eslintConfigPrettier,
|
|
13
|
+
...tseslint.configs.recommended,
|
|
14
|
+
{ plugins: { onlyWarn } },
|
|
15
|
+
{
|
|
16
|
+
rules: {
|
|
17
|
+
'@typescript-eslint/no-unused-vars': [
|
|
18
|
+
'warn',
|
|
19
|
+
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
files: ['**/*.{ts,tsx}'],
|
|
25
|
+
plugins: { react: pluginReact, 'react-hooks': pluginReactHooks },
|
|
26
|
+
languageOptions: { globals: { ...globals.browser } },
|
|
27
|
+
settings: { react: { version: 'detect' } },
|
|
28
|
+
rules: {
|
|
29
|
+
...pluginReact.configs.recommended.rules,
|
|
30
|
+
...pluginReactHooks.configs.recommended.rules,
|
|
31
|
+
'react/react-in-jsx-scope': 'off',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="ko" suppressHydrationWarning>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>sh-ui app</title>
|
|
8
|
+
<script>
|
|
9
|
+
// FOUC 차단 — ThemeProvider mount 전에 첫 paint 에 dark class 박기.
|
|
10
|
+
// matrix: 'dark' → .dark, 'light' → (none), 'system'/unset → system pref.
|
|
11
|
+
try {
|
|
12
|
+
var t = localStorage.getItem('theme');
|
|
13
|
+
var d = t === 'dark' || ((!t || t === 'system') && matchMedia('(prefers-color-scheme:dark)').matches);
|
|
14
|
+
if (d) document.documentElement.classList.add('dark');
|
|
15
|
+
} catch (e) {}
|
|
16
|
+
</script>
|
|
17
|
+
</head>
|
|
18
|
+
<body>
|
|
19
|
+
<div id="root"></div>
|
|
20
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "my-app",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": true,
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc -b && vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"lint": "eslint .",
|
|
11
|
+
"lint:fix": "eslint . --fix",
|
|
12
|
+
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
|
|
13
|
+
"typecheck": "tsc -b --noEmit",
|
|
14
|
+
"test": "vitest run",
|
|
15
|
+
"test:watch": "vitest"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@base-ui/react": "^1.4.1",
|
|
19
|
+
"@tanstack/react-query": "^5.90.21",
|
|
20
|
+
"class-variance-authority": "^0.7.1",
|
|
21
|
+
"clsx": "^2.1.1",
|
|
22
|
+
"lucide-react": "^0.563.0",
|
|
23
|
+
"react": "^19.2.4",
|
|
24
|
+
"react-dom": "^19.2.4",
|
|
25
|
+
"sonner": "^2.0.7",
|
|
26
|
+
"tailwind-merge": "^3.5.0",
|
|
27
|
+
"zod": "^4.3.6"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@eslint/js": "^9.39.2",
|
|
31
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
32
|
+
"@tanstack/react-query-devtools": "^5.91.3",
|
|
33
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
34
|
+
"@testing-library/react": "^16",
|
|
35
|
+
"@testing-library/user-event": "^14",
|
|
36
|
+
"@types/node": "^25.1.0",
|
|
37
|
+
"@types/react": "^19.2.10",
|
|
38
|
+
"@types/react-dom": "^19.2.3",
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
40
|
+
"@typescript-eslint/parser": "^8.54.0",
|
|
41
|
+
"@vitejs/plugin-react": "^5.0.0",
|
|
42
|
+
"eslint": "^9.39.2",
|
|
43
|
+
"eslint-config-prettier": "^10.1.8",
|
|
44
|
+
"eslint-plugin-boundaries": "^5.4.0",
|
|
45
|
+
"eslint-plugin-check-file": "^3.3.1",
|
|
46
|
+
"eslint-plugin-only-warn": "^1.1.0",
|
|
47
|
+
"eslint-plugin-react": "^7.37.5",
|
|
48
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
49
|
+
"globals": "^17.6.0",
|
|
50
|
+
"jsdom": "^29.0.0",
|
|
51
|
+
"prettier": "^3.8.1",
|
|
52
|
+
"prettier-plugin-tailwindcss": "^0.6.13",
|
|
53
|
+
"tailwindcss": "^4.1.18",
|
|
54
|
+
"typescript": "^5.9.3",
|
|
55
|
+
"typescript-eslint": "^8.54.0",
|
|
56
|
+
"vite": "^5.4.0",
|
|
57
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
58
|
+
"vitest": "^4.1.0"
|
|
59
|
+
},
|
|
60
|
+
"packageManager": "pnpm@10.4.1",
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=20"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"composite": true,
|
|
4
|
+
"skipLibCheck": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "Bundler",
|
|
7
|
+
"allowSyntheticDefaultImports": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"types": ["node"]
|
|
10
|
+
},
|
|
11
|
+
"include": ["vite.config.ts", "vitest.config.ts", "vitest.setup.ts"]
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
4
|
+
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [react(), tailwindcss(), tsconfigPaths()],
|
|
8
|
+
server: {
|
|
9
|
+
port: 5173,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineConfig, mergeConfig } from 'vitest/config';
|
|
2
|
+
import viteConfig from './vite.config';
|
|
3
|
+
|
|
4
|
+
export default mergeConfig(
|
|
5
|
+
viteConfig,
|
|
6
|
+
defineConfig({
|
|
7
|
+
test: {
|
|
8
|
+
environment: 'jsdom',
|
|
9
|
+
globals: true,
|
|
10
|
+
setupFiles: ['./vitest.setup.ts'],
|
|
11
|
+
},
|
|
12
|
+
}),
|
|
13
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom/vitest';
|