create-antd-layout 1.1.6 ā 1.1.8
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/bin/index.js +22 -57
- package/package.json +1 -1
- package/templates/antd-layout-vite-max/index.html +2 -2
- package/templates/antd-layout-vite-max/package-lock.json +277 -239
- package/templates/antd-layout-vite-max/package.json +7 -5
- package/templates/antd-layout-vite-max/pnpm-lock.yaml +47 -12
- package/templates/antd-layout-vite-max/src/components/AppChart.tsx +121 -0
- package/templates/antd-layout-vite-max/src/components/LanguageButton.tsx +54 -0
- package/templates/antd-layout-vite-max/src/components/PopoverPanel.tsx +48 -18
- package/templates/antd-layout-vite-max/src/components/ThemeButton.tsx +53 -19
- package/templates/antd-layout-vite-max/src/components/WardenLogo.tsx +35 -0
- package/templates/antd-layout-vite-max/src/components/typings.ts +5 -0
- package/templates/antd-layout-vite-max/src/index.css +2 -2
- package/templates/antd-layout-vite-max/src/layouts/index.tsx +33 -29
- package/templates/antd-layout-vite-max/src/layouts/menuData.tsx +45 -0
- package/templates/antd-layout-vite-max/src/locales/en-US/components.ts +42 -0
- package/templates/antd-layout-vite-max/src/locales/en-US/menus.ts +26 -0
- package/templates/antd-layout-vite-max/src/locales/en-US/pages.ts +161 -0
- package/templates/antd-layout-vite-max/src/locales/en-US.ts +53 -0
- package/templates/antd-layout-vite-max/src/locales/zh-CN/components.ts +42 -0
- package/templates/antd-layout-vite-max/src/locales/zh-CN/menus.ts +26 -0
- package/templates/antd-layout-vite-max/src/locales/zh-CN/pages.ts +161 -0
- package/templates/antd-layout-vite-max/src/locales/zh-CN.ts +53 -0
- package/templates/antd-layout-vite-max/src/pages/404.tsx +14 -0
- package/templates/antd-layout-vite-max/src/pages/login.tsx +2 -2
- package/templates/antd-layout-vite-max/src/pages/system/organizations/components.tsx +241 -0
- package/templates/antd-layout-vite-max/src/pages/system/organizations/dept.tsx +285 -0
- package/templates/antd-layout-vite-max/src/pages/system/organizations/user.tsx +224 -0
- package/templates/antd-layout-vite-max/src/pages/system/security/components.tsx +239 -0
- package/templates/antd-layout-vite-max/src/pages/system/security/firewall.tsx +212 -0
- package/templates/antd-layout-vite-max/src/pages/system/security/permission.tsx +296 -0
- package/templates/antd-layout-vite-max/src/pages/system/security/role.tsx +213 -0
- package/templates/antd-layout-vite-max/src/pages/system/settings.tsx +133 -0
- package/templates/antd-layout-vite-max/src/pages/transaction/components.tsx +410 -0
- package/templates/antd-layout-vite-max/src/pages/transaction/order.tsx +253 -15
- package/templates/antd-layout-vite-max/src/pages/transaction/product.tsx +231 -103
- package/templates/antd-layout-vite-max/src/pages/typings.ts +166 -0
- package/templates/antd-layout-vite-max/src/pages/welcome/components.tsx +535 -0
- package/templates/antd-layout-vite-max/src/pages/welcome/index.module.css +92 -0
- package/templates/antd-layout-vite-max/src/pages/welcome/index.tsx +39 -0
- package/templates/antd-layout-vite-max/src/pages/workbench/logs/login.tsx +255 -0
- package/templates/antd-layout-vite-max/src/pages/workbench/logs/operation.tsx +184 -0
- package/templates/antd-layout-vite-max/src/pages/workbench/monitoring/components.tsx +484 -0
- package/templates/antd-layout-vite-max/src/pages/workbench/monitoring/index.module.css +11 -0
- package/templates/antd-layout-vite-max/src/pages/workbench/monitoring/index.tsx +35 -0
- package/templates/antd-layout-vite-max/src/pages/workbench/notifications.tsx +179 -0
- package/templates/antd-layout-vite-max/src/pages/workbench/report/components.tsx +312 -0
- package/templates/antd-layout-vite-max/src/pages/workbench/report/sales.module.css +36 -0
- package/templates/antd-layout-vite-max/src/pages/workbench/report/sales.tsx +37 -0
- package/templates/antd-layout-vite-max/src/pages/workbench/report/visit.tsx +228 -0
- package/templates/antd-layout-vite-max/src/routes.ts +47 -11
- package/templates/antd-layout-vite-max/src/utils/printUtil.ts +71 -0
- package/templates/antd-layout-vite-max/src/utils/stringUtil.ts +46 -0
- package/templates/antd-layout-vite-max/yarn.lock +280 -254
- package/templates/antd-layout-vite-simple/package-lock.json +8 -8
- package/templates/antd-layout-vite-simple/package.json +1 -1
- package/templates/antd-layout-vite-simple/pnpm-lock.yaml +9 -9
- package/templates/antd-layout-vite-simple/yarn.lock +9 -9
- package/templates/antd-layout-vite-max/src/pages/system/config.tsx +0 -73
- package/templates/antd-layout-vite-max/src/pages/system/logs.tsx +0 -41
- package/templates/antd-layout-vite-max/src/pages/welcome.tsx +0 -31
package/bin/index.js
CHANGED
|
@@ -27,7 +27,7 @@ const TEMPLATES = [
|
|
|
27
27
|
name: "SSR + Next (Pro)",
|
|
28
28
|
value: "antd-layout-pro",
|
|
29
29
|
type: "remote",
|
|
30
|
-
repo: "zhouwenqi/adminui-demo-antd-layout-max",
|
|
30
|
+
repo: "https://github.com/zhouwenqi/adminui-demo-antd-layout-max.git",
|
|
31
31
|
},
|
|
32
32
|
];
|
|
33
33
|
const PACKAGE_MANAGERS = [
|
|
@@ -71,20 +71,6 @@ cd ${path_1.default.basename(cwd)}
|
|
|
71
71
|
${packageManager} install`));
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
async function startDevServer(packageManager, cwd) {
|
|
75
|
-
console.log(chalk_1.default.green(`\nš Starting development server...\n`));
|
|
76
|
-
try {
|
|
77
|
-
if (packageManager === 'yarn') {
|
|
78
|
-
await (0, execa_1.execa)('yarn', ['dev'], { cwd, stdio: 'inherit' });
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
await (0, execa_1.execa)(packageManager, ['run', 'dev'], { cwd, stdio: 'inherit' });
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
catch (error) {
|
|
85
|
-
process.exit(0);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
74
|
const program = new commander_1.Command();
|
|
89
75
|
program
|
|
90
76
|
.name('create-antd-layout')
|
|
@@ -154,48 +140,17 @@ program
|
|
|
154
140
|
pkg.name = projectName;
|
|
155
141
|
await fs_extra_1.default.writeJSON(pkgPath, pkg, { spaces: 2 });
|
|
156
142
|
}
|
|
157
|
-
let shouldInstall = true;
|
|
158
|
-
let packageManager;
|
|
159
|
-
if (template.type === 'local') {
|
|
160
|
-
const installAnswer = await inquirer_1.default.prompt([
|
|
161
|
-
{
|
|
162
|
-
type: 'confirm',
|
|
163
|
-
name: 'shouldInstall',
|
|
164
|
-
message: 'Do you want to install dependencies and start the app now?',
|
|
165
|
-
default: true,
|
|
166
|
-
},
|
|
167
|
-
]);
|
|
168
|
-
shouldInstall = installAnswer.shouldInstall;
|
|
169
|
-
}
|
|
170
|
-
if (!shouldInstall && template.type === 'local') {
|
|
171
|
-
console.log(chalk_1.default.green(`
|
|
172
|
-
ā
Project created successfully!
|
|
173
|
-
š Location: ${targetDir}
|
|
174
|
-
`));
|
|
175
|
-
console.log(chalk_1.default.yellow(`
|
|
176
|
-
š” To get started manually:
|
|
177
|
-
cd ${projectDir}
|
|
178
|
-
npm install # or yarn / pnpm install
|
|
179
|
-
npm run dev # or yarn dev / pnpm dev
|
|
180
|
-
`));
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
143
|
const detected = await detectPackageManager();
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
default: detected,
|
|
195
|
-
},
|
|
196
|
-
]);
|
|
197
|
-
packageManager = pmAnswer.packageManager;
|
|
198
|
-
}
|
|
144
|
+
const pmAnswer = await inquirer_1.default.prompt([
|
|
145
|
+
{
|
|
146
|
+
type: 'list',
|
|
147
|
+
name: 'packageManager',
|
|
148
|
+
message: 'Please choose package manager:',
|
|
149
|
+
choices: PACKAGE_MANAGERS,
|
|
150
|
+
default: detected,
|
|
151
|
+
},
|
|
152
|
+
]);
|
|
153
|
+
const packageManager = pmAnswer.packageManager;
|
|
199
154
|
await runInstall(packageManager, targetDir);
|
|
200
155
|
console.log(chalk_1.default.green(`
|
|
201
156
|
ā
Project created successfully!`));
|
|
@@ -205,6 +160,16 @@ program
|
|
|
205
160
|
š To start:`);
|
|
206
161
|
console.log(` cd ${projectDir}`);
|
|
207
162
|
console.log(` ${packageManager === 'yarn' ? 'yarn dev' : `${packageManager} run dev`}`);
|
|
208
|
-
|
|
163
|
+
try {
|
|
164
|
+
if (packageManager === 'yarn') {
|
|
165
|
+
await (0, execa_1.execa)('yarn', ['dev'], { cwd: targetDir, stdio: 'inherit' });
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
await (0, execa_1.execa)(packageManager, ['run', 'dev'], { cwd: targetDir, stdio: 'inherit' });
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
process.exit(0);
|
|
173
|
+
}
|
|
209
174
|
});
|
|
210
175
|
program.parse();
|
package/package.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>adminui-demo-antd-layout-
|
|
7
|
+
<title>adminui-demo-antd-layout-max</title>
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
<div id="root"></div>
|