@moluoxixi/create-app 2.0.404 → 2.0.407
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/README.md +41 -14
- package/dist/commands/create.js +9 -10
- package/dist/generators/react.js +0 -2
- package/dist/generators/vue.js +0 -2
- package/dist/test.js +8 -0
- package/dist/utils/deepMerge.js +1 -1
- package/dist/utils/featureMapping.d.ts +2 -2
- package/dist/utils/featureMapping.js +3 -5
- package/dist/utils/generateFrameworkProject.d.ts +0 -4
- package/dist/utils/generateFrameworkProject.js +1 -1
- package/dist/utils/install.d.ts +2 -1
- package/dist/utils/install.js +4 -3
- package/dist/utils/prompts.js +4 -30
- package/dist/utils/renderTemplate.js +9 -4
- package/package.json +2 -1
- package/templates/common/base/.gitmodules +4 -0
- package/templates/common/base/package.json +2 -0
- package/templates/common/base/vite.config.ts.ejs +13 -2
- package/templates/common/features/husky/package.json +2 -1
- package/templates/react/base/package.json +3 -1
- package/templates/react/{features/qiankun → base}/src/qiankun/index.ts +4 -0
- package/templates/react/base/src/stores/index.ts +5 -0
- package/templates/react/base/src/stores/user.ts +55 -0
- package/templates/react/{base/src/router/index.tsx.ejs → features/manualRoutes/src/router/index.tsx} +6 -5
- package/templates/react/features/pageRoutes/src/router/index.tsx +30 -0
- package/templates/vue/base/package.json +19 -15
- package/templates/vue/base/src/App.vue +1 -0
- package/templates/vue/base/src/assets/styles/base.scss +69 -0
- package/templates/vue/base/src/assets/styles/custom.scss +40 -0
- package/templates/vue/base/src/assets/styles/tailwind.scss +3 -0
- package/templates/vue/base/src/layouts/index.ts +22 -0
- package/templates/vue/base/src/main.ts.ejs +1 -0
- package/templates/vue/base/src/router/layout.vue +15 -0
- package/templates/vue/base/src/stores/index.ts +6 -0
- package/templates/vue/base/src/stores/modules/system.ts +51 -0
- package/templates/vue/base/src/stores/modules/user.ts +41 -0
- package/templates/vue/base/src/utils/index.ts +5 -0
- package/templates/vue/base/src/utils/modifyComponent.tsx +43 -0
- package/templates/vue/base/tsconfig.app.json +25 -16
- package/templates/vue/base/tsconfig.base.json +29 -22
- package/templates/vue/base/tsconfig.json +11 -11
- package/templates/vue/base/tsconfig.node.json +14 -14
- package/templates/vue/features/element-plus/src/assets/styles/element/fixQiankun.scss +10 -0
- package/templates/vue/features/element-plus/src/assets/styles/element/index.scss +3 -0
- package/templates/vue/features/element-plus/src/components/SubMenu/src/_types/index.ts +1 -5
- package/templates/vue/features/element-plus/src/components/SubMenu/src/_types/props.ts +16 -10
- package/templates/vue/features/element-plus/src/components/SubMenu/src/index.vue +60 -23
- package/templates/vue/features/element-plus/src/layouts/element.vue +106 -70
- package/templates/vue/features/manualRoutes/package.json +7 -0
- package/templates/vue/features/manualRoutes/src/router/index.ts +45 -0
- package/templates/vue/features/manualRoutes/src/router/layout.vue +11 -5
- package/templates/vue/features/manualRoutes/src/stores/index.ts +6 -0
- package/templates/vue/features/manualRoutes/src/stores/modules/system.ts +51 -0
- package/templates/vue/features/manualRoutes/src/stores/modules/user.ts +41 -0
- package/templates/vue/features/pageRoutes/package.json +4 -1
- package/templates/vue/features/pageRoutes/src/router/index.ts +46 -0
- package/templates/vue/features/pageRoutes/src/router/layout.vue +15 -0
- package/templates/vue/features/pageRoutes/src/stores/index.ts +6 -0
- package/templates/vue/features/pageRoutes/src/stores/modules/system.ts +51 -0
- package/templates/vue/features/pageRoutes/src/stores/modules/user.ts +41 -0
- package/templates/vue/features/sentry/package.json +3 -1
- package/templates/vue/features/sentry/src/stores/index.ts +13 -0
- package/templates/react/features/qiankun/package.json +0 -5
- package/templates/vue/base/src/router/index.ts.ejs +0 -36
- package/templates/vue/features/pinia/package.json +0 -7
- package/templates/vue/features/pinia/src/stores/index.ts +0 -15
- package/templates/vue/features/pinia/src/stores/system.ts +0 -59
- package/templates/vue/features/pinia/src/stores/user.ts +0 -56
- package/templates/vue/features/qiankun/node_modules/.bin/jiti +0 -17
- package/templates/vue/features/qiankun/node_modules/.bin/jiti.CMD +0 -12
- package/templates/vue/features/qiankun/node_modules/.bin/jiti.ps1 +0 -41
- package/templates/vue/features/qiankun/node_modules/.bin/sass +0 -17
- package/templates/vue/features/qiankun/node_modules/.bin/sass.CMD +0 -12
- package/templates/vue/features/qiankun/node_modules/.bin/sass.ps1 +0 -41
- package/templates/vue/features/qiankun/node_modules/.bin/terser +0 -17
- package/templates/vue/features/qiankun/node_modules/.bin/terser.CMD +0 -12
- package/templates/vue/features/qiankun/node_modules/.bin/terser.ps1 +0 -41
- package/templates/vue/features/qiankun/node_modules/.bin/tsc +0 -17
- package/templates/vue/features/qiankun/node_modules/.bin/tsc.CMD +0 -12
- package/templates/vue/features/qiankun/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/vue/features/qiankun/node_modules/.bin/tsserver +0 -17
- package/templates/vue/features/qiankun/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/vue/features/qiankun/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/vue/features/qiankun/node_modules/.bin/tsx +0 -17
- package/templates/vue/features/qiankun/node_modules/.bin/tsx.CMD +0 -12
- package/templates/vue/features/qiankun/node_modules/.bin/tsx.ps1 +0 -41
- package/templates/vue/features/qiankun/node_modules/.bin/vite +0 -17
- package/templates/vue/features/qiankun/node_modules/.bin/vite.CMD +0 -12
- package/templates/vue/features/qiankun/node_modules/.bin/vite.ps1 +0 -41
- package/templates/vue/features/qiankun/node_modules/.bin/yaml +0 -17
- package/templates/vue/features/qiankun/node_modules/.bin/yaml.CMD +0 -12
- package/templates/vue/features/qiankun/node_modules/.bin/yaml.ps1 +0 -41
- package/templates/vue/features/qiankun/package.json +0 -5
- package/templates/vue/features/qiankun/src/qiankun/index.ts +0 -74
- package/templates/vue/features/router/node_modules/.bin/tsc +0 -17
- package/templates/vue/features/router/node_modules/.bin/tsc.CMD +0 -12
- package/templates/vue/features/router/node_modules/.bin/tsc.ps1 +0 -41
- package/templates/vue/features/router/node_modules/.bin/tsserver +0 -17
- package/templates/vue/features/router/node_modules/.bin/tsserver.CMD +0 -12
- package/templates/vue/features/router/node_modules/.bin/tsserver.ps1 +0 -41
- package/templates/vue/features/router/package.json +0 -5
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/jiti +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/jiti.CMD +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/jiti.ps1 +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/sass +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/sass.CMD +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/sass.ps1 +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/terser +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/terser.CMD +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/terser.ps1 +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsc +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsc.CMD +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsc.ps1 +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsserver +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsserver.CMD +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsserver.ps1 +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsx +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsx.CMD +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsx.ps1 +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/vite +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/vite.CMD +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/vite.ps1 +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/yaml +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/yaml.CMD +0 -0
- /package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/yaml.ps1 +0 -0
- /package/templates/vue/features/{pinia → pageRoutes}/node_modules/.bin/tsc +0 -0
- /package/templates/vue/features/{pinia → pageRoutes}/node_modules/.bin/tsc.CMD +0 -0
- /package/templates/vue/features/{pinia → pageRoutes}/node_modules/.bin/tsc.ps1 +0 -0
- /package/templates/vue/features/{pinia → pageRoutes}/node_modules/.bin/tsserver +0 -0
- /package/templates/vue/features/{pinia → pageRoutes}/node_modules/.bin/tsserver.CMD +0 -0
- /package/templates/vue/features/{pinia → pageRoutes}/node_modules/.bin/tsserver.ps1 +0 -0
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env pwsh
|
|
2
|
-
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
3
|
-
|
|
4
|
-
$exe=""
|
|
5
|
-
$pathsep=":"
|
|
6
|
-
$env_node_path=$env:NODE_PATH
|
|
7
|
-
$new_node_path="E:\project\template\vite-cli\node_modules\.pnpm\vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b\node_modules\vite\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b\node_modules\vite\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules"
|
|
8
|
-
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
9
|
-
# Fix case when both the Windows and Linux builds of Node
|
|
10
|
-
# are installed in the same directory
|
|
11
|
-
$exe=".exe"
|
|
12
|
-
$pathsep=";"
|
|
13
|
-
} else {
|
|
14
|
-
$new_node_path="/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules"
|
|
15
|
-
}
|
|
16
|
-
if ([string]::IsNullOrEmpty($env_node_path)) {
|
|
17
|
-
$env:NODE_PATH=$new_node_path
|
|
18
|
-
} else {
|
|
19
|
-
$env:NODE_PATH="$new_node_path$pathsep$env_node_path"
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
$ret=0
|
|
23
|
-
if (Test-Path "$basedir/node$exe") {
|
|
24
|
-
# Support pipeline input
|
|
25
|
-
if ($MyInvocation.ExpectingInput) {
|
|
26
|
-
$input | & "$basedir/node$exe" "$basedir/../../../../../../node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/bin/vite.js" $args
|
|
27
|
-
} else {
|
|
28
|
-
& "$basedir/node$exe" "$basedir/../../../../../../node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/bin/vite.js" $args
|
|
29
|
-
}
|
|
30
|
-
$ret=$LASTEXITCODE
|
|
31
|
-
} else {
|
|
32
|
-
# Support pipeline input
|
|
33
|
-
if ($MyInvocation.ExpectingInput) {
|
|
34
|
-
$input | & "node$exe" "$basedir/../../../../../../node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/bin/vite.js" $args
|
|
35
|
-
} else {
|
|
36
|
-
& "node$exe" "$basedir/../../../../../../node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/bin/vite.js" $args
|
|
37
|
-
}
|
|
38
|
-
$ret=$LASTEXITCODE
|
|
39
|
-
}
|
|
40
|
-
$env:NODE_PATH=$env_node_path
|
|
41
|
-
exit $ret
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
-
esac
|
|
7
|
-
|
|
8
|
-
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" "$@"
|
|
17
|
-
fi
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
@SETLOCAL
|
|
2
|
-
@IF NOT DEFINED NODE_PATH (
|
|
3
|
-
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\yaml@2.8.2\node_modules\yaml\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\yaml@2.8.2\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules"
|
|
4
|
-
) ELSE (
|
|
5
|
-
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\yaml@2.8.2\node_modules\yaml\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\yaml@2.8.2\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
6
|
-
)
|
|
7
|
-
@IF EXIST "%~dp0\node.exe" (
|
|
8
|
-
"%~dp0\node.exe" "%~dp0\..\..\..\..\..\..\node_modules\.pnpm\yaml@2.8.2\node_modules\yaml\bin.mjs" %*
|
|
9
|
-
) ELSE (
|
|
10
|
-
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
-
node "%~dp0\..\..\..\..\..\..\node_modules\.pnpm\yaml@2.8.2\node_modules\yaml\bin.mjs" %*
|
|
12
|
-
)
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env pwsh
|
|
2
|
-
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
3
|
-
|
|
4
|
-
$exe=""
|
|
5
|
-
$pathsep=":"
|
|
6
|
-
$env_node_path=$env:NODE_PATH
|
|
7
|
-
$new_node_path="E:\project\template\vite-cli\node_modules\.pnpm\yaml@2.8.2\node_modules\yaml\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\yaml@2.8.2\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules"
|
|
8
|
-
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
9
|
-
# Fix case when both the Windows and Linux builds of Node
|
|
10
|
-
# are installed in the same directory
|
|
11
|
-
$exe=".exe"
|
|
12
|
-
$pathsep=";"
|
|
13
|
-
} else {
|
|
14
|
-
$new_node_path="/mnt/e/project/template/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules"
|
|
15
|
-
}
|
|
16
|
-
if ([string]::IsNullOrEmpty($env_node_path)) {
|
|
17
|
-
$env:NODE_PATH=$new_node_path
|
|
18
|
-
} else {
|
|
19
|
-
$env:NODE_PATH="$new_node_path$pathsep$env_node_path"
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
$ret=0
|
|
23
|
-
if (Test-Path "$basedir/node$exe") {
|
|
24
|
-
# Support pipeline input
|
|
25
|
-
if ($MyInvocation.ExpectingInput) {
|
|
26
|
-
$input | & "$basedir/node$exe" "$basedir/../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" $args
|
|
27
|
-
} else {
|
|
28
|
-
& "$basedir/node$exe" "$basedir/../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" $args
|
|
29
|
-
}
|
|
30
|
-
$ret=$LASTEXITCODE
|
|
31
|
-
} else {
|
|
32
|
-
# Support pipeline input
|
|
33
|
-
if ($MyInvocation.ExpectingInput) {
|
|
34
|
-
$input | & "node$exe" "$basedir/../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" $args
|
|
35
|
-
} else {
|
|
36
|
-
& "node$exe" "$basedir/../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" $args
|
|
37
|
-
}
|
|
38
|
-
$ret=$LASTEXITCODE
|
|
39
|
-
}
|
|
40
|
-
$env:NODE_PATH=$env_node_path
|
|
41
|
-
exit $ret
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import type { App } from 'vue'
|
|
2
|
-
import type { Router } from 'vue-router'
|
|
3
|
-
import {
|
|
4
|
-
qiankunWindow,
|
|
5
|
-
renderWithQiankun,
|
|
6
|
-
} from 'vite-plugin-qiankun/dist/helper'
|
|
7
|
-
|
|
8
|
-
let app: App | null = null
|
|
9
|
-
let router: Router | null = null
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Qiankun 微前端 Props 接口
|
|
13
|
-
*/
|
|
14
|
-
interface QiankunProps {
|
|
15
|
-
/** 容器元素(可选) */
|
|
16
|
-
container?: Element
|
|
17
|
-
/** 其他自定义属性 */
|
|
18
|
-
[key: string]: unknown
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Qiankun 渲染选项接口
|
|
23
|
-
*/
|
|
24
|
-
interface RenderOptions {
|
|
25
|
-
/** 创建 Vue 应用实例的函数 */
|
|
26
|
-
createApp: () => App
|
|
27
|
-
/** 创建 Vue Router 实例的函数 */
|
|
28
|
-
createRouter: (qiankunName?: string) => Router
|
|
29
|
-
/** 挂载应用实例的函数 */
|
|
30
|
-
mountApp: (app: App, router: Router, container: string | Element) => void
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* 设置 Qiankun 微前端
|
|
35
|
-
* @param options 渲染选项
|
|
36
|
-
*/
|
|
37
|
-
export function setupQiankun(options: RenderOptions): void {
|
|
38
|
-
const { createApp, createRouter, mountApp } = options
|
|
39
|
-
|
|
40
|
-
renderWithQiankun({
|
|
41
|
-
mount(props: QiankunProps) {
|
|
42
|
-
app = createApp()
|
|
43
|
-
const qiankunName = qiankunWindow.__POWERED_BY_QIANKUN__
|
|
44
|
-
? (qiankunWindow as { __INJECTED_PUBLIC_PATH_BY_QIANKUN__?: string }).__INJECTED_PUBLIC_PATH_BY_QIANKUN__?.split('/')[1]
|
|
45
|
-
: undefined
|
|
46
|
-
router = createRouter(qiankunName)
|
|
47
|
-
const container = props.container
|
|
48
|
-
? props.container.querySelector('#app')!
|
|
49
|
-
: '#app'
|
|
50
|
-
mountApp(app, router, container)
|
|
51
|
-
},
|
|
52
|
-
bootstrap() {
|
|
53
|
-
console.log('[Qiankun] bootstrap')
|
|
54
|
-
},
|
|
55
|
-
unmount() {
|
|
56
|
-
if (app) {
|
|
57
|
-
app.unmount()
|
|
58
|
-
app = null
|
|
59
|
-
router = null
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
update() {
|
|
63
|
-
console.log('[Qiankun] update')
|
|
64
|
-
},
|
|
65
|
-
})
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* 判断是否运行在 Qiankun 微前端环境中
|
|
70
|
-
* @returns 是否在 Qiankun 环境中
|
|
71
|
-
*/
|
|
72
|
-
export function isQiankun(): boolean {
|
|
73
|
-
return qiankunWindow.__POWERED_BY_QIANKUN__ || false
|
|
74
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
-
esac
|
|
7
|
-
|
|
8
|
-
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsc" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsc" "$@"
|
|
17
|
-
fi
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
@SETLOCAL
|
|
2
|
-
@IF NOT DEFINED NODE_PATH (
|
|
3
|
-
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules"
|
|
4
|
-
) ELSE (
|
|
5
|
-
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
6
|
-
)
|
|
7
|
-
@IF EXIST "%~dp0\node.exe" (
|
|
8
|
-
"%~dp0\node.exe" "%~dp0\..\..\..\..\..\..\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\tsc" %*
|
|
9
|
-
) ELSE (
|
|
10
|
-
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
-
node "%~dp0\..\..\..\..\..\..\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\tsc" %*
|
|
12
|
-
)
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env pwsh
|
|
2
|
-
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
3
|
-
|
|
4
|
-
$exe=""
|
|
5
|
-
$pathsep=":"
|
|
6
|
-
$env_node_path=$env:NODE_PATH
|
|
7
|
-
$new_node_path="E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules"
|
|
8
|
-
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
9
|
-
# Fix case when both the Windows and Linux builds of Node
|
|
10
|
-
# are installed in the same directory
|
|
11
|
-
$exe=".exe"
|
|
12
|
-
$pathsep=";"
|
|
13
|
-
} else {
|
|
14
|
-
$new_node_path="/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules"
|
|
15
|
-
}
|
|
16
|
-
if ([string]::IsNullOrEmpty($env_node_path)) {
|
|
17
|
-
$env:NODE_PATH=$new_node_path
|
|
18
|
-
} else {
|
|
19
|
-
$env:NODE_PATH="$new_node_path$pathsep$env_node_path"
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
$ret=0
|
|
23
|
-
if (Test-Path "$basedir/node$exe") {
|
|
24
|
-
# Support pipeline input
|
|
25
|
-
if ($MyInvocation.ExpectingInput) {
|
|
26
|
-
$input | & "$basedir/node$exe" "$basedir/../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsc" $args
|
|
27
|
-
} else {
|
|
28
|
-
& "$basedir/node$exe" "$basedir/../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsc" $args
|
|
29
|
-
}
|
|
30
|
-
$ret=$LASTEXITCODE
|
|
31
|
-
} else {
|
|
32
|
-
# Support pipeline input
|
|
33
|
-
if ($MyInvocation.ExpectingInput) {
|
|
34
|
-
$input | & "node$exe" "$basedir/../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsc" $args
|
|
35
|
-
} else {
|
|
36
|
-
& "node$exe" "$basedir/../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsc" $args
|
|
37
|
-
}
|
|
38
|
-
$ret=$LASTEXITCODE
|
|
39
|
-
}
|
|
40
|
-
$env:NODE_PATH=$env_node_path
|
|
41
|
-
exit $ret
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
-
esac
|
|
7
|
-
|
|
8
|
-
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsserver" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsserver" "$@"
|
|
17
|
-
fi
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
@SETLOCAL
|
|
2
|
-
@IF NOT DEFINED NODE_PATH (
|
|
3
|
-
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules"
|
|
4
|
-
) ELSE (
|
|
5
|
-
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
6
|
-
)
|
|
7
|
-
@IF EXIST "%~dp0\node.exe" (
|
|
8
|
-
"%~dp0\node.exe" "%~dp0\..\..\..\..\..\..\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\tsserver" %*
|
|
9
|
-
) ELSE (
|
|
10
|
-
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
-
node "%~dp0\..\..\..\..\..\..\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\tsserver" %*
|
|
12
|
-
)
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env pwsh
|
|
2
|
-
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
3
|
-
|
|
4
|
-
$exe=""
|
|
5
|
-
$pathsep=":"
|
|
6
|
-
$env_node_path=$env:NODE_PATH
|
|
7
|
-
$new_node_path="E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules"
|
|
8
|
-
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
9
|
-
# Fix case when both the Windows and Linux builds of Node
|
|
10
|
-
# are installed in the same directory
|
|
11
|
-
$exe=".exe"
|
|
12
|
-
$pathsep=";"
|
|
13
|
-
} else {
|
|
14
|
-
$new_node_path="/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules"
|
|
15
|
-
}
|
|
16
|
-
if ([string]::IsNullOrEmpty($env_node_path)) {
|
|
17
|
-
$env:NODE_PATH=$new_node_path
|
|
18
|
-
} else {
|
|
19
|
-
$env:NODE_PATH="$new_node_path$pathsep$env_node_path"
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
$ret=0
|
|
23
|
-
if (Test-Path "$basedir/node$exe") {
|
|
24
|
-
# Support pipeline input
|
|
25
|
-
if ($MyInvocation.ExpectingInput) {
|
|
26
|
-
$input | & "$basedir/node$exe" "$basedir/../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsserver" $args
|
|
27
|
-
} else {
|
|
28
|
-
& "$basedir/node$exe" "$basedir/../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsserver" $args
|
|
29
|
-
}
|
|
30
|
-
$ret=$LASTEXITCODE
|
|
31
|
-
} else {
|
|
32
|
-
# Support pipeline input
|
|
33
|
-
if ($MyInvocation.ExpectingInput) {
|
|
34
|
-
$input | & "node$exe" "$basedir/../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsserver" $args
|
|
35
|
-
} else {
|
|
36
|
-
& "node$exe" "$basedir/../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsserver" $args
|
|
37
|
-
}
|
|
38
|
-
$ret=$LASTEXITCODE
|
|
39
|
-
}
|
|
40
|
-
$env:NODE_PATH=$env_node_path
|
|
41
|
-
exit $ret
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/jiti
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/jiti.CMD
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/jiti.ps1
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/sass
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/sass.CMD
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/sass.ps1
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/terser
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/terser.CMD
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/terser.ps1
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsc
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsc.CMD
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsc.ps1
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsserver
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsx
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsx.CMD
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/tsx.ps1
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/vite
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/vite.CMD
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/vite.ps1
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/yaml
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/yaml.CMD
RENAMED
|
File without changes
|
/package/templates/{react/features/qiankun → vue/features/manualRoutes}/node_modules/.bin/yaml.ps1
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|