@moluoxixi/create-app 2.0.420 → 2.0.426
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/constants/index.d.ts +66 -0
- package/dist/constants/index.js +71 -0
- package/dist/core/feature.d.ts +1 -1
- package/dist/core/feature.js +11 -27
- package/dist/core/prompts.js +7 -31
- package/dist/generators/project.js +3 -6
- package/dist/test.js +11 -17
- package/dist/types/features.d.ts +3 -1
- package/dist/types/features.js +3 -1
- package/dist/utils/install.js +3 -3
- package/package.json +1 -1
- 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/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
|
@@ -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
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import path from 'node:path'
|
|
2
|
-
import cssModuleGlobalRootPlugin from '@moluoxixi/css-module-global-root-plugin'
|
|
3
|
-
import { ViteConfig, wrapperEnv } from '@moluoxixi/vite-config'
|
|
4
|
-
import { loadEnv, mergeConfig } from 'vite'
|
|
5
|
-
import process from 'node:process'
|
|
6
|
-
import { loadFeatureConfigs } from './vite/index.ts'
|
|
7
|
-
|
|
8
|
-
const config: ReturnType<typeof ViteConfig> = ViteConfig(({ mode }) => {
|
|
9
|
-
const env = loadEnv(mode!, process.cwd())
|
|
10
|
-
const viteEnv = wrapperEnv(env)
|
|
11
|
-
const rootPath = path.resolve()
|
|
12
|
-
const appCode = viteEnv.VITE_APP_CODE
|
|
13
|
-
const appTitle = viteEnv.VITE_APP_TITLE
|
|
14
|
-
const port = viteEnv.VITE_APP_PORT
|
|
15
|
-
|
|
16
|
-
// 加载所有 feature 配置
|
|
17
|
-
const featureConfig = loadFeatureConfigs({ viteEnv, mode: mode!, appCode })
|
|
18
|
-
|
|
19
|
-
return {
|
|
20
|
-
rootPath,
|
|
21
|
-
appTitle,
|
|
22
|
-
appCode,
|
|
23
|
-
port,
|
|
24
|
-
vue: true,
|
|
25
|
-
autoComponent: true,
|
|
26
|
-
pageRoutes: true,
|
|
27
|
-
viteConfig: mergeConfig(
|
|
28
|
-
{
|
|
29
|
-
server: {
|
|
30
|
-
proxy: {
|
|
31
|
-
'/api': {
|
|
32
|
-
changeOrigin: true,
|
|
33
|
-
target: 'http://localhost:3000',
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
headers: {
|
|
37
|
-
'Access-Control-Allow-Origin': '*',
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
css: {
|
|
41
|
-
preprocessorOptions: {
|
|
42
|
-
scss: {
|
|
43
|
-
silenceDeprecations: ['legacy-js-api'],
|
|
44
|
-
api: 'modern-compiler',
|
|
45
|
-
},
|
|
46
|
-
postcss: {
|
|
47
|
-
plugins: [
|
|
48
|
-
cssModuleGlobalRootPlugin() as any,
|
|
49
|
-
],
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
featureConfig,
|
|
55
|
-
),
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
export default config
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|