@moluoxixi/create-app 2.0.408 → 2.0.411
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/test.js +168 -87
- package/dist/types/features.d.ts +7 -9
- package/dist/types/features.js +6 -25
- package/dist/types/index.d.ts +20 -13
- package/dist/utils/featureMapping.d.ts +5 -26
- package/dist/utils/featureMapping.js +24 -68
- package/dist/utils/generateFrameworkProject.d.ts +2 -0
- package/dist/utils/generateFrameworkProject.js +136 -21
- package/dist/utils/prompts.js +37 -7
- package/dist/utils/renderFeatures.d.ts +38 -1
- package/dist/utils/renderFeatures.js +121 -37
- package/dist/utils/routeModeMapping.d.ts +14 -0
- package/dist/utils/routeModeMapping.js +15 -0
- package/package.json +2 -3
- package/templates/common/base/package.json +1 -1
- package/templates/common/base/vite.config.ts.ejs +1 -1
- package/templates/react/base/package.json +1 -3
- package/templates/react/base/src/main.tsx.ejs +16 -43
- package/templates/react/features/pageRoutes/package.json +1 -0
- package/templates/react/micro-frontends/qiankun/base/package.json +6 -0
- package/templates/react/micro-frontends/qiankun/base/src/main.tsx.ejs +83 -0
- package/templates/react/micro-frontends/qiankun/base/vite.config.ts.ejs +89 -0
- package/templates/vue/base/package.json +1 -5
- package/templates/vue/base/src/main.ts.ejs +18 -41
- package/templates/vue/features/element-plus/src/layouts/element.vue +1 -4
- package/templates/vue/features/manualRoutes/package.json +0 -1
- package/templates/vue/features/manualRoutes/src/router/index.ts +11 -12
- package/templates/vue/features/manualRoutes/src/router/routes.ts +14 -23
- package/templates/vue/features/pageRoutes/package.json +0 -1
- package/templates/vue/features/pageRoutes/src/router/index.ts +11 -12
- package/templates/vue/features/pinia/node_modules/.bin/tsc +17 -0
- package/templates/vue/features/pinia/node_modules/.bin/tsc.CMD +12 -0
- package/templates/vue/features/pinia/node_modules/.bin/tsc.ps1 +41 -0
- package/templates/vue/features/pinia/node_modules/.bin/tsserver +17 -0
- package/templates/vue/features/pinia/node_modules/.bin/tsserver.CMD +12 -0
- package/templates/vue/features/pinia/node_modules/.bin/tsserver.ps1 +41 -0
- package/templates/vue/features/pinia/package.json +6 -0
- package/templates/vue/micro-frontends/qiankun/base/package.json +6 -0
- package/templates/vue/micro-frontends/qiankun/base/src/main.ts.ejs +87 -0
- package/templates/vue/micro-frontends/qiankun/base/vite.config.ts.ejs +89 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/layouts/element.vue +120 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/jiti +17 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/jiti.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/jiti.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/sass +17 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/sass.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/sass.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/terser +17 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/terser.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/terser.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsc +17 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsc.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsc.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsserver +17 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsserver.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsserver.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsx +17 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsx.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/tsx.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/vite +17 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/vite.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/vite.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/yaml +17 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/yaml.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/yaml.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/package.json +5 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/src/router/index.ts +56 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/jiti +17 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/jiti.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/jiti.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/sass +17 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/sass.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/sass.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/terser +17 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/terser.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/terser.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsc +17 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsc.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsc.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsserver +17 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsserver.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsserver.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsx +17 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsx.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/tsx.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/vite +17 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/vite.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/vite.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/yaml +17 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/yaml.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/yaml.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/package.json +5 -0
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/src/router/index.ts +57 -0
- package/templates/react/base/src/qiankun/index.ts +0 -83
- package/templates/react/base/src/stores/user.ts +0 -55
- package/templates/vue/base/src/router/layout.vue +0 -15
- package/templates/vue/features/manualRoutes/src/stores/index.ts +0 -6
- package/templates/vue/features/manualRoutes/src/stores/modules/system.ts +0 -51
- package/templates/vue/features/manualRoutes/src/stores/modules/user.ts +0 -41
- package/templates/vue/features/pageRoutes/src/stores/index.ts +0 -6
- package/templates/vue/features/pageRoutes/src/stores/modules/system.ts +0 -51
- package/templates/vue/features/pageRoutes/src/stores/modules/user.ts +0 -41
- /package/templates/react/features/{router → manualRoutes}/package.json +0 -0
- /package/templates/react/{base → features/zustand}/src/stores/index.ts +0 -0
- /package/templates/vue/{base → features/pinia}/src/stores/index.ts +0 -0
- /package/templates/vue/{base → features/pinia}/src/stores/modules/system.ts +0 -0
- /package/templates/vue/{base → features/pinia}/src/stores/modules/user.ts +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
)
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 应用入口文件 - Qiankun 微前端模式
|
|
3
|
+
* 初始化 Vue 应用并挂载到 DOM(支持 qiankun 生命周期)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { qiankunWindow, renderWithQiankun } from 'vite-plugin-qiankun/dist/helper'
|
|
7
|
+
import { createApp } from 'vue'
|
|
8
|
+
import directives from '@/directives'
|
|
9
|
+
<% if (i18n) { -%>
|
|
10
|
+
import i18n from '@/locales'
|
|
11
|
+
<% } -%>
|
|
12
|
+
<% if (sentry) { -%>
|
|
13
|
+
import { initSentry } from '@/utils/sentry'
|
|
14
|
+
<% } -%>
|
|
15
|
+
import { store } from '@/stores'
|
|
16
|
+
import App from './App.vue'
|
|
17
|
+
import getRouter from './router'
|
|
18
|
+
|
|
19
|
+
// 导入样式文件
|
|
20
|
+
<% if (uiLibrary === 'element-plus') { -%>
|
|
21
|
+
import '@/assets/styles/element/index.scss'
|
|
22
|
+
import '@/assets/styles/element/fixQiankun.scss'
|
|
23
|
+
<% } -%>
|
|
24
|
+
import '@/assets/styles/main.scss'
|
|
25
|
+
import '@/assets/fonts/index.css'
|
|
26
|
+
|
|
27
|
+
let app: ReturnType<typeof createApp> | null = null
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 渲染应用
|
|
31
|
+
* @param props 渲染属性
|
|
32
|
+
*/
|
|
33
|
+
async function render(props: Record<string, unknown> = {}): Promise<void> {
|
|
34
|
+
const { container } = props as { container?: Element }
|
|
35
|
+
app = createApp(App)
|
|
36
|
+
|
|
37
|
+
directives(app)
|
|
38
|
+
const router = getRouter(props)
|
|
39
|
+
|
|
40
|
+
<% if (sentry) { -%>
|
|
41
|
+
initSentry(app, router, {
|
|
42
|
+
dsn: import.meta.env.VITE_SENTRY_DSN,
|
|
43
|
+
environment: import.meta.env.MODE,
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
<% } -%>
|
|
47
|
+
app.use(store)
|
|
48
|
+
<% if (i18n) { -%>
|
|
49
|
+
app.use(i18n)
|
|
50
|
+
<% } -%>
|
|
51
|
+
app.use(router)
|
|
52
|
+
app.config.warnHandler = () => null
|
|
53
|
+
|
|
54
|
+
if (container) {
|
|
55
|
+
const root = container.querySelector('#app')
|
|
56
|
+
app.mount(root)
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
app.mount('#app')
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Qiankun 生命周期
|
|
64
|
+
if (!qiankunWindow.__POWERED_BY_QIANKUN__) {
|
|
65
|
+
// 独立运行模式
|
|
66
|
+
render({})
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
// 微前端运行模式
|
|
70
|
+
renderWithQiankun({
|
|
71
|
+
async mount(props: Record<string, unknown>) {
|
|
72
|
+
await render(props)
|
|
73
|
+
},
|
|
74
|
+
bootstrap() {
|
|
75
|
+
console.log('[Qiankun] Vue app bootstrapped')
|
|
76
|
+
},
|
|
77
|
+
unmount() {
|
|
78
|
+
app?.unmount()
|
|
79
|
+
app = null
|
|
80
|
+
console.log('[Qiankun] Vue app unmounted')
|
|
81
|
+
},
|
|
82
|
+
update() {
|
|
83
|
+
console.log('[Qiankun] Vue app updated')
|
|
84
|
+
},
|
|
85
|
+
})
|
|
86
|
+
}
|
|
87
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
import process from 'node:process'
|
|
3
|
+
import cssModuleGlobalRootPlugin from '@moluoxixi/css-module-global-root-plugin'
|
|
4
|
+
import { ViteConfig, wrapperEnv } from '@moluoxixi/vite-config'
|
|
5
|
+
import { loadEnv } from 'vite'
|
|
6
|
+
<% if (sentry) { -%>
|
|
7
|
+
import { sentryVitePlugin } from '@sentry/vite-plugin'
|
|
8
|
+
<% } -%>
|
|
9
|
+
|
|
10
|
+
export default ViteConfig(
|
|
11
|
+
({ mode }) => {
|
|
12
|
+
const env = loadEnv(mode!, process.cwd())
|
|
13
|
+
const viteEnv = wrapperEnv(env)
|
|
14
|
+
const rootPath = path.resolve()
|
|
15
|
+
const appCode = viteEnv.VITE_APP_CODE
|
|
16
|
+
const appTitle = viteEnv.VITE_APP_TITLE
|
|
17
|
+
const port = viteEnv.VITE_APP_PORT
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
rootPath,
|
|
21
|
+
appTitle,
|
|
22
|
+
appCode,
|
|
23
|
+
port,
|
|
24
|
+
<% if (framework === 'vue') { -%>
|
|
25
|
+
vue: true,
|
|
26
|
+
autoComponent: true,
|
|
27
|
+
<% } else if (framework === 'react') { -%>
|
|
28
|
+
react: true,
|
|
29
|
+
<% } -%>
|
|
30
|
+
<% if (routeMode === 'pageRoutes') { -%>
|
|
31
|
+
pageRoutes: true,
|
|
32
|
+
<% } -%>
|
|
33
|
+
viteConfig: {
|
|
34
|
+
plugins: [
|
|
35
|
+
<% if (sentry) { -%>
|
|
36
|
+
viteEnv.VITE_SENTRY && mode === 'production' && sentryVitePlugin({
|
|
37
|
+
authToken: process.env.SENTRY_AUTH_TOKEN,
|
|
38
|
+
org: 'f1f562b9b82f',
|
|
39
|
+
project: 'javascript-<%= framework %>',
|
|
40
|
+
sourcemaps: {
|
|
41
|
+
assets: './dist/**',
|
|
42
|
+
ignore: ['node_modules'],
|
|
43
|
+
},
|
|
44
|
+
release: {
|
|
45
|
+
name: viteEnv.VITE_APP_VERSION || 'unknown',
|
|
46
|
+
},
|
|
47
|
+
}),
|
|
48
|
+
<% } -%>
|
|
49
|
+
],
|
|
50
|
+
server: {
|
|
51
|
+
proxy: {
|
|
52
|
+
'/api': {
|
|
53
|
+
changeOrigin: true,
|
|
54
|
+
target: 'http://localhost:3000',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
headers: {
|
|
58
|
+
'Access-Control-Allow-Origin': '*',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
css: {
|
|
62
|
+
preprocessorOptions: {
|
|
63
|
+
scss: {
|
|
64
|
+
silenceDeprecations: ['legacy-js-api'],
|
|
65
|
+
api: 'modern-compiler',
|
|
66
|
+
<% if (uiLibrary === 'element-plus') { -%>
|
|
67
|
+
additionalData: (source: string, filename: string) => {
|
|
68
|
+
if (filename.includes('assets/styles/element/index.scss')) {
|
|
69
|
+
return `$namespace : ${appCode || 'el'};
|
|
70
|
+
${source}`
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
return source
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
<% } -%>
|
|
77
|
+
},
|
|
78
|
+
postcss: {
|
|
79
|
+
plugins: [
|
|
80
|
+
cssModuleGlobalRootPlugin() as any,
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
)
|
|
89
|
+
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ElConfigProvider :namespace="systemCode" :empty-values="[undefined]">
|
|
3
|
+
<div
|
|
4
|
+
class="h-full"
|
|
5
|
+
:class="{ 'h-screen!': !qiankunWindow.__POWERED_BY_QIANKUN__ }"
|
|
6
|
+
:style="`--el-color-primary: ${themeColor || '#3A77FF'};`"
|
|
7
|
+
>
|
|
8
|
+
<ElContainer class="w-full h-full">
|
|
9
|
+
<ElHeader
|
|
10
|
+
v-if="!qiankunWindow.__POWERED_BY_QIANKUN__"
|
|
11
|
+
class="headerbox"
|
|
12
|
+
style="padding: 0"
|
|
13
|
+
height="60"
|
|
14
|
+
>
|
|
15
|
+
<div class="w-full h-full bg-primary flex justify-center">
|
|
16
|
+
<ElMenu :default-active="defaultTab" :ellipsis="false" mode="horizontal" router>
|
|
17
|
+
<SubMenu menu-height="60" :routes="routes" />
|
|
18
|
+
</ElMenu>
|
|
19
|
+
</div>
|
|
20
|
+
</ElHeader>
|
|
21
|
+
<ElMain>
|
|
22
|
+
<ElContainer class="h-full w-full">
|
|
23
|
+
<ElMain style="background-color: #fff">
|
|
24
|
+
<transition name="fade">
|
|
25
|
+
<RouterView v-slot="{ Component, route }">
|
|
26
|
+
<keep-alive>
|
|
27
|
+
<component :is="Component" v-if="route.meta.keep" :key="route.path" />
|
|
28
|
+
</keep-alive>
|
|
29
|
+
<component :is="Component" v-if="!route.meta.keep" :key="route.path" />
|
|
30
|
+
</RouterView>
|
|
31
|
+
</transition>
|
|
32
|
+
</ElMain>
|
|
33
|
+
</ElContainer>
|
|
34
|
+
</ElMain>
|
|
35
|
+
</ElContainer>
|
|
36
|
+
</div>
|
|
37
|
+
</ElConfigProvider>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script lang="ts" setup>
|
|
41
|
+
import { ElConfigProvider, ElContainer, ElHeader, ElMain, ElMenu } from 'element-plus'
|
|
42
|
+
import { qiankunWindow } from 'vite-plugin-qiankun/dist/helper'
|
|
43
|
+
import { computed, reactive } from 'vue'
|
|
44
|
+
import { RouterView, useRouter } from 'vue-router'
|
|
45
|
+
import SubMenu from '@/components/SubMenu'
|
|
46
|
+
import { useSystemStore } from '@/stores/modules/system'
|
|
47
|
+
|
|
48
|
+
const router = useRouter()
|
|
49
|
+
const routes = reactive(router.options.routes[0].children!)
|
|
50
|
+
const systemStore = useSystemStore()
|
|
51
|
+
const themeColor = computed(() => systemStore.themeColor)
|
|
52
|
+
const systemCode = computed(() => {
|
|
53
|
+
return systemStore.systemCode
|
|
54
|
+
})
|
|
55
|
+
const defaultTab = computed(() => router.currentRoute.value.path)
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<style lang="scss" scoped>
|
|
59
|
+
:deep(.el-main) {
|
|
60
|
+
--el-main-padding: 12px !important;
|
|
61
|
+
}
|
|
62
|
+
.bg-primary {
|
|
63
|
+
background-color: var(--el-color-primary);
|
|
64
|
+
}
|
|
65
|
+
.headerbox {
|
|
66
|
+
:deep(.el-menu) {
|
|
67
|
+
background-color: var(--el-color-primary);
|
|
68
|
+
|
|
69
|
+
.el-menu-item,
|
|
70
|
+
.el-sub-menu {
|
|
71
|
+
background-color: var(--el-color-primary);
|
|
72
|
+
color: #fff !important;
|
|
73
|
+
|
|
74
|
+
.el-sub-menu__title {
|
|
75
|
+
background-color: var(--el-color-primary);
|
|
76
|
+
color: #fff !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&.is-active,
|
|
80
|
+
&:hover {
|
|
81
|
+
background-color: #fff;
|
|
82
|
+
color: var(--el-color-primary) !important;
|
|
83
|
+
|
|
84
|
+
.el-sub-menu__title,
|
|
85
|
+
.el-sub-menu__title:hover {
|
|
86
|
+
background-color: #fff;
|
|
87
|
+
color: var(--el-color-primary) !important;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&.el-menu--popup {
|
|
93
|
+
background-color: #fff;
|
|
94
|
+
|
|
95
|
+
.el-sub-menu,
|
|
96
|
+
.el-menu-item {
|
|
97
|
+
background-color: #fff !important;
|
|
98
|
+
color: var(--el-color-primary) !important;
|
|
99
|
+
|
|
100
|
+
.el-sub-menu__title {
|
|
101
|
+
background-color: #fff;
|
|
102
|
+
color: var(--el-color-primary) !important;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&.is-active,
|
|
106
|
+
&:hover {
|
|
107
|
+
background-color: var(--el-color-primary) !important;
|
|
108
|
+
color: #fff !important;
|
|
109
|
+
|
|
110
|
+
.el-sub-menu__title,
|
|
111
|
+
.el-sub-menu__title:hover {
|
|
112
|
+
background-color: var(--el-color-primary) !important;
|
|
113
|
+
color: #fff !important;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
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/jiti@2.6.1/node_modules/jiti/lib/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/jiti@2.6.1/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/jiti@2.6.1/node_modules/jiti/lib/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/jiti@2.6.1/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/jiti@2.6.1/node_modules/jiti/lib/jiti-cli.mjs" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../../../../node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti-cli.mjs" "$@"
|
|
17
|
+
fi
|
package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/jiti.CMD
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@SETLOCAL
|
|
2
|
+
@IF NOT DEFINED NODE_PATH (
|
|
3
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\jiti@2.6.1\node_modules\jiti\lib\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\jiti@2.6.1\node_modules\jiti\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\jiti@2.6.1\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\jiti@2.6.1\node_modules\jiti\lib\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\jiti@2.6.1\node_modules\jiti\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\jiti@2.6.1\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\jiti@2.6.1\node_modules\jiti\lib\jiti-cli.mjs" %*
|
|
9
|
+
) ELSE (
|
|
10
|
+
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
+
node "%~dp0\..\..\..\..\..\..\..\..\node_modules\.pnpm\jiti@2.6.1\node_modules\jiti\lib\jiti-cli.mjs" %*
|
|
12
|
+
)
|
package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/jiti.ps1
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
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\jiti@2.6.1\node_modules\jiti\lib\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\jiti@2.6.1\node_modules\jiti\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\jiti@2.6.1\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/jiti@2.6.1/node_modules/jiti/lib/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/jiti@2.6.1/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/jiti@2.6.1/node_modules/jiti/lib/jiti-cli.mjs" $args
|
|
27
|
+
} else {
|
|
28
|
+
& "$basedir/node$exe" "$basedir/../../../../../../../../node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti-cli.mjs" $args
|
|
29
|
+
}
|
|
30
|
+
$ret=$LASTEXITCODE
|
|
31
|
+
} else {
|
|
32
|
+
# Support pipeline input
|
|
33
|
+
if ($MyInvocation.ExpectingInput) {
|
|
34
|
+
$input | & "node$exe" "$basedir/../../../../../../../../node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti-cli.mjs" $args
|
|
35
|
+
} else {
|
|
36
|
+
& "node$exe" "$basedir/../../../../../../../../node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti-cli.mjs" $args
|
|
37
|
+
}
|
|
38
|
+
$ret=$LASTEXITCODE
|
|
39
|
+
}
|
|
40
|
+
$env:NODE_PATH=$env_node_path
|
|
41
|
+
exit $ret
|
|
@@ -0,0 +1,17 @@
|
|
|
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/sass@1.97.1/node_modules/sass/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/sass@1.97.1/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/sass@1.97.1/node_modules/sass/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/sass@1.97.1/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/sass@1.97.1/node_modules/sass/sass.js" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../../../../node_modules/.pnpm/sass@1.97.1/node_modules/sass/sass.js" "$@"
|
|
17
|
+
fi
|
package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/sass.CMD
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@SETLOCAL
|
|
2
|
+
@IF NOT DEFINED NODE_PATH (
|
|
3
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\sass@1.97.1\node_modules\sass\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\sass@1.97.1\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\sass@1.97.1\node_modules\sass\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\sass@1.97.1\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\sass@1.97.1\node_modules\sass\sass.js" %*
|
|
9
|
+
) ELSE (
|
|
10
|
+
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
+
node "%~dp0\..\..\..\..\..\..\..\..\node_modules\.pnpm\sass@1.97.1\node_modules\sass\sass.js" %*
|
|
12
|
+
)
|
package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/sass.ps1
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
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\sass@1.97.1\node_modules\sass\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\sass@1.97.1\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/sass@1.97.1/node_modules/sass/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/sass@1.97.1/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/sass@1.97.1/node_modules/sass/sass.js" $args
|
|
27
|
+
} else {
|
|
28
|
+
& "$basedir/node$exe" "$basedir/../../../../../../../../node_modules/.pnpm/sass@1.97.1/node_modules/sass/sass.js" $args
|
|
29
|
+
}
|
|
30
|
+
$ret=$LASTEXITCODE
|
|
31
|
+
} else {
|
|
32
|
+
# Support pipeline input
|
|
33
|
+
if ($MyInvocation.ExpectingInput) {
|
|
34
|
+
$input | & "node$exe" "$basedir/../../../../../../../../node_modules/.pnpm/sass@1.97.1/node_modules/sass/sass.js" $args
|
|
35
|
+
} else {
|
|
36
|
+
& "node$exe" "$basedir/../../../../../../../../node_modules/.pnpm/sass@1.97.1/node_modules/sass/sass.js" $args
|
|
37
|
+
}
|
|
38
|
+
$ret=$LASTEXITCODE
|
|
39
|
+
}
|
|
40
|
+
$env:NODE_PATH=$env_node_path
|
|
41
|
+
exit $ret
|
|
@@ -0,0 +1,17 @@
|
|
|
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/terser@5.44.1/node_modules/terser/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules/terser/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/terser@5.44.1/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/terser@5.44.1/node_modules/terser/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules/terser/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/terser@5.44.1/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/terser@5.44.1/node_modules/terser/bin/terser" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../../../../node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/terser" "$@"
|
|
17
|
+
fi
|
package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/terser.CMD
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@SETLOCAL
|
|
2
|
+
@IF NOT DEFINED NODE_PATH (
|
|
3
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\node_modules\terser\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\node_modules\terser\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\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\terser@5.44.1\node_modules\terser\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\node_modules\terser\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\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\terser@5.44.1\node_modules\terser\bin\terser" %*
|
|
9
|
+
) ELSE (
|
|
10
|
+
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
+
node "%~dp0\..\..\..\..\..\..\..\..\node_modules\.pnpm\terser@5.44.1\node_modules\terser\bin\terser" %*
|
|
12
|
+
)
|
package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/terser.ps1
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
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\terser@5.44.1\node_modules\terser\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\node_modules\terser\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\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/terser@5.44.1/node_modules/terser/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules/terser/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/terser@5.44.1/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/terser@5.44.1/node_modules/terser/bin/terser" $args
|
|
27
|
+
} else {
|
|
28
|
+
& "$basedir/node$exe" "$basedir/../../../../../../../../node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/terser" $args
|
|
29
|
+
}
|
|
30
|
+
$ret=$LASTEXITCODE
|
|
31
|
+
} else {
|
|
32
|
+
# Support pipeline input
|
|
33
|
+
if ($MyInvocation.ExpectingInput) {
|
|
34
|
+
$input | & "node$exe" "$basedir/../../../../../../../../node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/terser" $args
|
|
35
|
+
} else {
|
|
36
|
+
& "node$exe" "$basedir/../../../../../../../../node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/terser" $args
|
|
37
|
+
}
|
|
38
|
+
$ret=$LASTEXITCODE
|
|
39
|
+
}
|
|
40
|
+
$env:NODE_PATH=$env_node_path
|
|
41
|
+
exit $ret
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
)
|