дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-29 13:52:36 +02:00
New Project gains three JavaScript generators that run the official packages through the chosen package manager: Vue (create-vue) with TypeScript, Vue Router, Pinia, Vitest and ESLint options; Expo (React Native) with blank, blank TypeScript and tabs templates; and Electron (Electron Forge) with Vite, Vite + TypeScript and webpack + TypeScript. create-vue gets a kebab-case folder renamed to the project name and a no-op flag when every option is off so it never prompts. Electron always installs, since Forge writes the dependencies by installing them. Static Website moves to the end of the group. Brand icons and en/zh strings added. Closes #6338 Co-authored-by: wildcatDownstairs <[email protected]>
48 рядки
1.3 KiB
TOML
48 рядки
1.3 KiB
TOML
id = "electron"
|
|
name = "Electron"
|
|
group = "JavaScript"
|
|
icon = "project-electron"
|
|
order = 11
|
|
description = "A desktop app on Electron from Electron Forge's create-electron-app."
|
|
|
|
[[requires]]
|
|
program = "node"
|
|
min = "20.19"
|
|
hint = "Install Node.js 20.19 or later: https://nodejs.org"
|
|
|
|
[[requires]]
|
|
program = "{{pm}}"
|
|
when = { pm = ["pnpm", "yarn"] }
|
|
hint = "Install it, or choose npm."
|
|
|
|
[[fields]]
|
|
id = "template"
|
|
label = "Template:"
|
|
type = "choice"
|
|
options = [
|
|
{ value = "vite-ts", label = "Vite + TypeScript" },
|
|
{ value = "vite", label = "Vite" },
|
|
{ value = "webpack-ts", label = "webpack + TypeScript" },
|
|
]
|
|
default = "vite-ts"
|
|
|
|
[[fields]]
|
|
id = "pm"
|
|
label = "Package manager:"
|
|
type = "choice"
|
|
segmented = true
|
|
options = ["npm", "pnpm", "yarn"]
|
|
default = "npm"
|
|
|
|
# Forge installs the dependencies itself: it adds them to package.json by installing them.
|
|
[[steps]]
|
|
label = "Running create-electron-app"
|
|
package = "create-electron-app@latest"
|
|
cwd = "parent"
|
|
args = [
|
|
"init", "{{name}}", "--skip-git", "--package-manager", "{{pm}}",
|
|
{ when = { template = ["vite", "vite-ts"] }, args = ["--template", "vite"] },
|
|
{ when = { template = "webpack-ts" }, args = ["--template", "webpack"] },
|
|
{ when = { template = ["vite-ts", "webpack-ts"] }, args = ["--typescript"] },
|
|
]
|