@moluoxixi/create-app 2.0.419 → 2.0.425
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/dist/commands/create.js +4 -4
- package/dist/utils/install.js +23 -4
- package/package.json +2 -1
- package/templates/common/base/package.json +2 -2
- package/templates/common/base/src/assets/styles/base.scss +23 -54
- package/templates/common/base/src/assets/styles/custom.scss +19 -5
- package/templates/common/base/src/assets/styles/main.scss +8 -0
- package/templates/common/base/src/assets/styles/tailwind.scss +3 -5
- package/templates/common/base/vite.config.ts +1 -3
- package/templates/common/features/eslint/eslint.config.ts +20 -0
- package/templates/common/features/husky/package.json +3 -1
- package/templates/react/base/package.json +0 -2
- package/templates/react/micro-frontends/qiankun/base/package.json +1 -3
- package/templates/vue/base/package.json +0 -2
- package/templates/vue/{base → features/element-plus}/src/assets/styles/custom.scss +0 -20
- package/templates/vue/features/element-plus/src/assets/styles/element.scss +27 -0
- package/templates/vue/features/element-plus/src/assets/styles/main.scss +9 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/vite +4 -4
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/vite.CMD +4 -4
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/vite.ps1 +6 -6
- package/templates/vue/micro-frontends/qiankun/base/package.json +1 -3
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/assets/styles/base.scss +69 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/assets/styles/custom.scss +20 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/assets/styles/main.scss +9 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/assets/styles/tailwind.scss +3 -0
- package/templates/react/base/src/assets/styles/main.scss +0 -8
- package/templates/react/features/eslint/eslint.config.ts +0 -11
- package/templates/react/micro-frontends/qiankun/base/vite.config.ts +0 -58
- package/templates/vue/base/src/assets/styles/main.scss +0 -8
- package/templates/vue/features/eslint/eslint.config.ts +0 -11
- package/templates/vue/features/eslint/node_modules/.bin/browserslist +0 -17
- package/templates/vue/features/eslint/node_modules/.bin/browserslist.CMD +0 -12
- package/templates/vue/features/eslint/node_modules/.bin/browserslist.ps1 +0 -41
- package/templates/vue/features/eslint/node_modules/.bin/eslint +0 -17
- package/templates/vue/features/eslint/node_modules/.bin/eslint.CMD +0 -12
- package/templates/vue/features/eslint/node_modules/.bin/eslint.ps1 +0 -41
- package/templates/vue/features/eslint/node_modules/.bin/jiti +0 -17
- package/templates/vue/features/eslint/node_modules/.bin/jiti.CMD +0 -12
- package/templates/vue/features/eslint/node_modules/.bin/jiti.ps1 +0 -41
- package/templates/vue/features/eslint/node_modules/.bin/tsc +0 -17
- package/templates/vue/features/eslint/node_modules/.bin/tsc.CMD +0 -12
- package/templates/vue/features/eslint/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/vue/features/eslint/node_modules/.bin/tsserver +0 -17
- package/templates/vue/features/eslint/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/vue/features/eslint/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/vue/features/eslint/package.json +0 -7
- package/templates/vue/micro-frontends/qiankun/base/vite.config.ts +0 -59
- /package/templates/{react → common}/features/eslint/node_modules/.bin/browserslist +0 -0
- /package/templates/{react → common}/features/eslint/node_modules/.bin/browserslist.CMD +0 -0
- /package/templates/{react → common}/features/eslint/node_modules/.bin/browserslist.ps1 +0 -0
- /package/templates/{react → common}/features/eslint/node_modules/.bin/eslint +0 -0
- /package/templates/{react → common}/features/eslint/node_modules/.bin/eslint.CMD +0 -0
- /package/templates/{react → common}/features/eslint/node_modules/.bin/eslint.ps1 +0 -0
- /package/templates/{react → common}/features/eslint/node_modules/.bin/jiti +0 -0
- /package/templates/{react → common}/features/eslint/node_modules/.bin/jiti.CMD +0 -0
- /package/templates/{react → common}/features/eslint/node_modules/.bin/jiti.ps1 +0 -0
- /package/templates/{react → common}/features/eslint/node_modules/.bin/tsc +0 -0
- /package/templates/{react → common}/features/eslint/node_modules/.bin/tsc.CMD +0 -0
- /package/templates/{react → common}/features/eslint/node_modules/.bin/tsc.ps1 +0 -0
- /package/templates/{react → common}/features/eslint/node_modules/.bin/tsserver +0 -0
- /package/templates/{react → common}/features/eslint/node_modules/.bin/tsserver.CMD +0 -0
- /package/templates/{react → common}/features/eslint/node_modules/.bin/tsserver.ps1 +0 -0
- /package/templates/{react → common}/features/eslint/package.json +0 -0
- /package/templates/vue/{base → features/element-plus}/src/assets/styles/base.scss +0 -0
- /package/templates/vue/{base → features/element-plus}/src/assets/styles/tailwind.scss +0 -0
- /package/templates/vue/{features → micro-frontends/qiankun/features}/element-plus/src/assets/styles/element/fixQiankun.scss +0 -0
- /package/templates/vue/{features → micro-frontends/qiankun/features}/element-plus/src/assets/styles/element/index.scss +0 -0
package/dist/commands/create.js
CHANGED
|
@@ -60,14 +60,14 @@ export async function createProject(projectName) {
|
|
|
60
60
|
gitSpinner.warn('Git 初始化跳过');
|
|
61
61
|
}
|
|
62
62
|
// 安装依赖
|
|
63
|
-
|
|
63
|
+
console.log(chalk.blue('\n📦 开始安装依赖...\n'));
|
|
64
64
|
try {
|
|
65
65
|
await installDependencies(config.packageManager, config.targetDir, 1);
|
|
66
|
-
|
|
66
|
+
console.log(chalk.green('\n✅ 依赖安装成功!\n'));
|
|
67
67
|
}
|
|
68
68
|
catch (error) {
|
|
69
|
-
|
|
70
|
-
console.log(chalk.yellow('
|
|
69
|
+
console.log(chalk.red('\n❌ 依赖安装失败\n'));
|
|
70
|
+
console.log(chalk.yellow('⚠️ 项目已创建,但依赖安装失败。'));
|
|
71
71
|
console.log(chalk.yellow(` 请手动运行 "${config.packageManager} install"\n`));
|
|
72
72
|
if (error instanceof Error) {
|
|
73
73
|
console.log(chalk.gray(` 错误详情: ${error.message}`));
|
package/dist/utils/install.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* 依赖安装工具
|
|
3
3
|
* 执行包管理器安装依赖
|
|
4
4
|
*/
|
|
5
|
-
import { exec } from 'node:child_process';
|
|
5
|
+
import { exec, spawn } from 'node:child_process';
|
|
6
6
|
import { promisify } from 'node:util';
|
|
7
7
|
import { validatePath } from "./file.js";
|
|
8
|
-
const execAsync = promisify(exec);
|
|
8
|
+
const execAsync = promisify(exec); // exec 用于 initGit 函数
|
|
9
9
|
/** 重试延迟基数(毫秒) */
|
|
10
10
|
const RETRY_DELAY_BASE_MS = 1000;
|
|
11
11
|
/**
|
|
@@ -43,8 +43,25 @@ export async function installDependencies(packageManager, cwd, retries = 0) {
|
|
|
43
43
|
let lastError;
|
|
44
44
|
for (let attempt = 0; attempt <= retries; attempt++) {
|
|
45
45
|
try {
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
// 使用 spawn 以支持实时输出
|
|
47
|
+
await new Promise((resolve, reject) => {
|
|
48
|
+
const [cmd, ...args] = command.split(' ');
|
|
49
|
+
const child = spawn(cmd, args, {
|
|
50
|
+
cwd,
|
|
51
|
+
stdio: 'inherit', // 直接输出到终端
|
|
52
|
+
shell: true, // Windows 需要 shell
|
|
53
|
+
});
|
|
54
|
+
child.on('close', (code) => {
|
|
55
|
+
if (code === 0) {
|
|
56
|
+
resolve();
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
reject(new Error(`命令退出,退出码: ${code}`));
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
child.on('error', (error) => {
|
|
63
|
+
reject(error);
|
|
64
|
+
});
|
|
48
65
|
});
|
|
49
66
|
return; // 成功则返回
|
|
50
67
|
}
|
|
@@ -72,6 +89,8 @@ export async function initGit(cwd, projectName) {
|
|
|
72
89
|
// 验证路径安全性
|
|
73
90
|
validatePath(cwd);
|
|
74
91
|
await execAsync('git init', { cwd });
|
|
92
|
+
// 添加 AIRules 子模块
|
|
93
|
+
await execAsync('git submodule add -b main https://github.com/moluoxixi/AIRules.git .cursor', { cwd });
|
|
75
94
|
await execAsync('git add .', { cwd });
|
|
76
95
|
await execAsync(`git commit -m "feat: initialize ${projectName}"`, { cwd });
|
|
77
96
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moluoxixi/create-app",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.425",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Create Vue/React projects with atomic layered architecture",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"type-check": "tsc --noEmit",
|
|
72
72
|
"lint:eslint": "eslint . --fix",
|
|
73
73
|
"submodule:update": "git submodule update --init --recursive --remote",
|
|
74
|
+
"postinstall": "pnpm submodule:update",
|
|
74
75
|
"lint-staged": "lint-staged",
|
|
75
76
|
"commit": "git add . && git-cz",
|
|
76
77
|
"version:patch": "pnpm version patch --no-git-tag-version",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"packageManager": "pnpm@10.8.0",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"dev": "vite",
|
|
12
|
-
"submodule:update": "git submodule update --init --recursive",
|
|
13
|
-
"
|
|
12
|
+
"submodule:update": "git submodule update --init --recursive --remote",
|
|
13
|
+
"postinstall": "pnpm submodule:update",
|
|
14
14
|
"build": "vite build --mode production",
|
|
15
15
|
"build:zip": "vite build --mode production && tsx scripts/build.mts",
|
|
16
16
|
"preview": "vite preview",
|
|
@@ -1,64 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*,
|
|
7
|
-
*::before,
|
|
8
|
-
*::after {
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
margin: 0;
|
|
11
|
-
padding: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
html {
|
|
15
|
-
font-size: 16px;
|
|
16
|
-
line-height: 1.5;
|
|
17
|
-
-webkit-font-smoothing: antialiased;
|
|
18
|
-
-moz-osx-font-smoothing: grayscale;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
body {
|
|
22
|
-
min-height: 100vh;
|
|
23
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
1
|
+
:root {
|
|
2
|
+
// 这里定义变量
|
|
3
|
+
/* 文字颜色 */
|
|
4
|
+
--text-color: #2a3651;
|
|
24
5
|
}
|
|
25
6
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
canvas,
|
|
30
|
-
svg {
|
|
31
|
-
display: block;
|
|
32
|
-
max-width: 100%;
|
|
7
|
+
::-webkit-scrollbar {
|
|
8
|
+
width: 6px;
|
|
9
|
+
height: 6px;
|
|
33
10
|
}
|
|
34
11
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
select {
|
|
39
|
-
font: inherit;
|
|
12
|
+
::-webkit-scrollbar-thumb {
|
|
13
|
+
background-color: #dddee0; /* 设置滑块的颜色 */
|
|
14
|
+
border-radius: 5px; /* 设置滑块的圆角 */
|
|
40
15
|
}
|
|
41
16
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
overflow-wrap: break-word;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
a {
|
|
53
|
-
color: inherit;
|
|
54
|
-
text-decoration: none;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
ul,
|
|
58
|
-
ol {
|
|
59
|
-
list-style: none;
|
|
17
|
+
body {
|
|
18
|
+
color: var(--text-color);
|
|
19
|
+
transition:
|
|
20
|
+
color 0.5s,
|
|
21
|
+
background-color 0.5s;
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
font-family: SourceHanSans-Regular, serif;
|
|
60
24
|
}
|
|
61
25
|
|
|
62
26
|
#app {
|
|
63
|
-
|
|
27
|
+
margin: 0;
|
|
28
|
+
padding: 0;
|
|
29
|
+
font-weight: normal;
|
|
30
|
+
background: #f1f2f4;
|
|
31
|
+
height: 100%;
|
|
32
|
+
overflow-y: auto;
|
|
64
33
|
}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
.text-bold {
|
|
2
|
+
font-family: SourceHanSans-Semibold, serif;
|
|
3
|
+
font-weight: bold;
|
|
4
|
+
}
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
.text-medium {
|
|
7
|
+
font-family: SourceHanSans-Medium, serif;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.text-regular {
|
|
11
|
+
font-family: SourceHanSans-Regular, serif;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.text-light {
|
|
15
|
+
font-family: SourceHanSans-Light, serif;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.box-shadow {
|
|
19
|
+
box-shadow: 0 2px 10px 0 rgb(52 81 212 / 20%);
|
|
20
|
+
}
|
|
@@ -14,16 +14,14 @@ const config: ReturnType<typeof ViteConfig> = ViteConfig(({ mode }) => {
|
|
|
14
14
|
const port = viteEnv.VITE_APP_PORT
|
|
15
15
|
|
|
16
16
|
// 加载所有 feature 配置
|
|
17
|
-
const featureConfig = loadFeatureConfigs({ viteEnv, mode
|
|
17
|
+
const featureConfig = loadFeatureConfigs({ viteEnv, mode, appCode })
|
|
18
18
|
|
|
19
19
|
return {
|
|
20
20
|
rootPath,
|
|
21
21
|
appTitle,
|
|
22
22
|
appCode,
|
|
23
23
|
port,
|
|
24
|
-
vue: true,
|
|
25
24
|
autoComponent: true,
|
|
26
|
-
pageRoutes: true,
|
|
27
25
|
viteConfig: mergeConfig(
|
|
28
26
|
{
|
|
29
27
|
server: {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import eslintConfig from '@moluoxixi/eslint-config'
|
|
2
|
+
|
|
3
|
+
export default eslintConfig({
|
|
4
|
+
formatters: true,
|
|
5
|
+
ignores: [],
|
|
6
|
+
rules: {
|
|
7
|
+
//#region 不能在定义前使用变量
|
|
8
|
+
'no-use-before-define': 'off',
|
|
9
|
+
'ts/no-use-before-define': 'off',
|
|
10
|
+
// #endregion
|
|
11
|
+
// import 排序
|
|
12
|
+
'perfectionist/sort-imports': 'off',
|
|
13
|
+
// 未使用的变量
|
|
14
|
+
'unused-imports/no-unused-vars': 'off',
|
|
15
|
+
// 不允许使用console
|
|
16
|
+
'no-console': 'off',
|
|
17
|
+
// 是否使用function声明顶级函数,开启后会导致偶先eslint格式失败,当文件中eslint格式问题过多时建议关闭,不多时保留此注释
|
|
18
|
+
// 'antfu/top-level-function': 'off',
|
|
19
|
+
},
|
|
20
|
+
})
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"scripts": {
|
|
3
|
-
"prepare": "
|
|
3
|
+
"prepare": "node .husky/install.mjs",
|
|
4
|
+
"postinstall": "pnpm submodule:update",
|
|
5
|
+
"submodule:update": "git submodule update --init --recursive --remote",
|
|
4
6
|
"lint-staged": "lint-staged",
|
|
5
7
|
"commit": "git add . && git-cz"
|
|
6
8
|
},
|
|
@@ -18,23 +18,3 @@
|
|
|
18
18
|
.box-shadow {
|
|
19
19
|
box-shadow: 0 2px 10px 0 rgb(52 81 212 / 20%);
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
.rounded-0 {
|
|
23
|
-
border-radius: 0;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.rounded-4 {
|
|
27
|
-
border-radius: 4px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.rounded-8 {
|
|
31
|
-
border-radius: 8px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.rounded-12 {
|
|
35
|
-
border-radius: 12px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.rounded-16 {
|
|
39
|
-
border-radius: 16px;
|
|
40
|
-
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Element Plus 样式定制
|
|
3
|
+
* 自定义 Element Plus 主题
|
|
4
|
+
*/
|
|
5
|
+
@forward 'element-plus/theme-chalk/src/mixins/config.scss';
|
|
6
|
+
|
|
7
|
+
@forward 'element-plus/theme-chalk/src/common/var.scss' with (
|
|
8
|
+
$colors: (
|
|
9
|
+
'primary': (
|
|
10
|
+
'base': #409eff,
|
|
11
|
+
),
|
|
12
|
+
'success': (
|
|
13
|
+
'base': #67c23a,
|
|
14
|
+
),
|
|
15
|
+
'warning': (
|
|
16
|
+
'base': #e6a23c,
|
|
17
|
+
),
|
|
18
|
+
'danger': (
|
|
19
|
+
'base': #f56c6c,
|
|
20
|
+
),
|
|
21
|
+
'info': (
|
|
22
|
+
'base': #909399,
|
|
23
|
+
),
|
|
24
|
+
)
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
@use 'element-plus/theme-chalk/src/index.scss' as *;
|
|
@@ -6,12 +6,12 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.
|
|
9
|
+
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862/node_modules/vite/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862/node_modules/vite/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.
|
|
11
|
+
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862/node_modules/vite/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862/node_modules/vite/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir
|
|
14
|
+
exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir
|
|
16
|
+
exec node "$basedir/../vite/bin/vite.js" "$@"
|
|
17
17
|
fi
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
@SETLOCAL
|
|
2
2
|
@IF NOT DEFINED NODE_PATH (
|
|
3
|
-
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\vite@7.
|
|
3
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862\node_modules\vite\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862\node_modules\vite\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules"
|
|
4
4
|
) ELSE (
|
|
5
|
-
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\vite@7.
|
|
5
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862\node_modules\vite\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862\node_modules\vite\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
6
6
|
)
|
|
7
7
|
@IF EXIST "%~dp0\node.exe" (
|
|
8
|
-
"%~dp0\node.exe" "%~dp0
|
|
8
|
+
"%~dp0\node.exe" "%~dp0\..\vite\bin\vite.js" %*
|
|
9
9
|
) ELSE (
|
|
10
10
|
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
-
node "%~dp0
|
|
11
|
+
node "%~dp0\..\vite\bin\vite.js" %*
|
|
12
12
|
)
|
|
@@ -4,14 +4,14 @@ $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
|
4
4
|
$exe=""
|
|
5
5
|
$pathsep=":"
|
|
6
6
|
$env_node_path=$env:NODE_PATH
|
|
7
|
-
$new_node_path="E:\project\template\vite-cli\node_modules\.pnpm\vite@7.
|
|
7
|
+
$new_node_path="E:\project\template\vite-cli\node_modules\.pnpm\vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862\node_modules\vite\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862\node_modules\vite\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules"
|
|
8
8
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
9
9
|
# Fix case when both the Windows and Linux builds of Node
|
|
10
10
|
# are installed in the same directory
|
|
11
11
|
$exe=".exe"
|
|
12
12
|
$pathsep=";"
|
|
13
13
|
} else {
|
|
14
|
-
$new_node_path="/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.
|
|
14
|
+
$new_node_path="/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862/node_modules/vite/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862/node_modules/vite/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.1.11_@types+node@22._a442b9e867f9e314d66f8a1e734ad862/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules"
|
|
15
15
|
}
|
|
16
16
|
if ([string]::IsNullOrEmpty($env_node_path)) {
|
|
17
17
|
$env:NODE_PATH=$new_node_path
|
|
@@ -23,17 +23,17 @@ $ret=0
|
|
|
23
23
|
if (Test-Path "$basedir/node$exe") {
|
|
24
24
|
# Support pipeline input
|
|
25
25
|
if ($MyInvocation.ExpectingInput) {
|
|
26
|
-
$input | & "$basedir/node$exe" "$basedir
|
|
26
|
+
$input | & "$basedir/node$exe" "$basedir/../vite/bin/vite.js" $args
|
|
27
27
|
} else {
|
|
28
|
-
& "$basedir/node$exe" "$basedir
|
|
28
|
+
& "$basedir/node$exe" "$basedir/../vite/bin/vite.js" $args
|
|
29
29
|
}
|
|
30
30
|
$ret=$LASTEXITCODE
|
|
31
31
|
} else {
|
|
32
32
|
# Support pipeline input
|
|
33
33
|
if ($MyInvocation.ExpectingInput) {
|
|
34
|
-
$input | & "node$exe" "$basedir
|
|
34
|
+
$input | & "node$exe" "$basedir/../vite/bin/vite.js" $args
|
|
35
35
|
} else {
|
|
36
|
-
& "node$exe" "$basedir
|
|
36
|
+
& "node$exe" "$basedir/../vite/bin/vite.js" $args
|
|
37
37
|
}
|
|
38
38
|
$ret=$LASTEXITCODE
|
|
39
39
|
}
|
package/templates/vue/micro-frontends/qiankun/features/element-plus/src/assets/styles/base.scss
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--primary-color: #3a77ff; /* 主色调 */
|
|
3
|
+
--primary-color-1: #3a81ff; /* 辅助色1 */
|
|
4
|
+
--primary-color-2: #518fff; /* 辅助色2 */
|
|
5
|
+
--primary-color-3: #53a0fd; /* 辅助色3 */
|
|
6
|
+
--primary-color-4: #f7faff; /* 辅助色4 */
|
|
7
|
+
--success-color: #0eb67f; /* 辅助色5 */
|
|
8
|
+
--success-color-1: #f6fffc; /* 辅助色6 */
|
|
9
|
+
--warning-color: #f5ab01; /* 提醒色 */
|
|
10
|
+
--danger-color: #ef6b53; /* 警告色 */
|
|
11
|
+
|
|
12
|
+
/* 文字颜色 */
|
|
13
|
+
--text-color: #2a3651;
|
|
14
|
+
--text-color-1: #29354f;
|
|
15
|
+
--text-color-disable: #a9aeb9;
|
|
16
|
+
--text-color-choose: #3a77ff;
|
|
17
|
+
--text-color-white: white;
|
|
18
|
+
|
|
19
|
+
/* 边框色 */
|
|
20
|
+
--border-color-1: #dcdfe6;
|
|
21
|
+
--border-color-2: #b1b6bd;
|
|
22
|
+
--border-color-3: #e3e6e9;
|
|
23
|
+
--border-color-4: #e0e4e8;
|
|
24
|
+
--border-color-5: #0317c4bf;
|
|
25
|
+
--border-color-6: #7ba4ff;
|
|
26
|
+
|
|
27
|
+
/* 背景色 */
|
|
28
|
+
--bg-color-1: #f1f2f4;
|
|
29
|
+
--bg-color-2: #fafbfc;
|
|
30
|
+
--bg-color-3: #29354f;
|
|
31
|
+
--bg-color-4: #f5f7fa;
|
|
32
|
+
--bg-color-5: #f6f9ff;
|
|
33
|
+
--bg-color-6: #ebf2ff;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
*,
|
|
37
|
+
*::before,
|
|
38
|
+
*::after {
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
margin: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
::-webkit-scrollbar {
|
|
44
|
+
width: 6px;
|
|
45
|
+
height: 6px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
::-webkit-scrollbar-thumb {
|
|
49
|
+
background-color: #dddee0; /* 设置滑块的颜色 */
|
|
50
|
+
border-radius: 5px; /* 设置滑块的圆角 */
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
body {
|
|
54
|
+
color: var(--text-color);
|
|
55
|
+
transition:
|
|
56
|
+
color 0.5s,
|
|
57
|
+
background-color 0.5s;
|
|
58
|
+
font-size: 14px;
|
|
59
|
+
font-family: SourceHanSans-Regular, serif;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
#app {
|
|
63
|
+
margin: 0;
|
|
64
|
+
padding: 0;
|
|
65
|
+
font-weight: normal;
|
|
66
|
+
background: #f1f2f4;
|
|
67
|
+
height: 100%;
|
|
68
|
+
overflow-y: auto;
|
|
69
|
+
}
|
package/templates/vue/micro-frontends/qiankun/features/element-plus/src/assets/styles/custom.scss
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.text-bold {
|
|
2
|
+
font-family: SourceHanSans-Semibold, serif;
|
|
3
|
+
font-weight: bold;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.text-medium {
|
|
7
|
+
font-family: SourceHanSans-Medium, serif;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.text-regular {
|
|
11
|
+
font-family: SourceHanSans-Regular, serif;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.text-light {
|
|
15
|
+
font-family: SourceHanSans-Light, serif;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.box-shadow {
|
|
19
|
+
box-shadow: 0 2px 10px 0 rgb(52 81 212 / 20%);
|
|
20
|
+
}
|