mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-14 16:07:52 +00:00
File › New Project offers 38 generators grouped by language (Java, Spring Boot, Quarkus, Micronaut, Kotlin, Ktor, Scala, Python/Django/FastAPI/Flask, Node/Vite/Next.js/Nuxt/Angular/SvelteKit/Astro/NestJS/Express, Go, Rust, C/C++, Zig, .NET, PHP/Laravel/Symfony, Ruby/Rails, Dart/Flutter, Swift, Elixir/Phoenix, Haskell, static website, empty). Each is a declaration in generators/<id>.toml run by the new ide-scaffold crate: built-in templates, the framework's official CLI run non-interactively, or a project service zip (Spring Initializr, code.quarkus.io, Micronaut Launch) whose metadata becomes form fields. Projects are built in a staging directory and moved into place only on success. The dialog renders each form from its schema, flags missing toolchains with install hints and streams progress; created projects open trusted. New Project is also on the welcome screen and the title bar project menu. Closes #709
49 lines
1.3 KiB
TOML
49 lines
1.3 KiB
TOML
id = "dotnet"
|
|
name = ".NET"
|
|
group = ".NET"
|
|
icon = "project-dotnet"
|
|
description = "A .NET project from dotnet new."
|
|
|
|
[[requires]]
|
|
program = "dotnet"
|
|
hint = "Install the .NET SDK: https://dotnet.microsoft.com/download"
|
|
|
|
[[fields]]
|
|
id = "template"
|
|
label = "Template:"
|
|
type = "choice"
|
|
options = [
|
|
{ value = "console", label = "Console App" },
|
|
{ value = "classlib", label = "Class Library" },
|
|
{ value = "webapi", label = "ASP.NET Core Web API" },
|
|
{ value = "mvc", label = "ASP.NET Core MVC" },
|
|
{ value = "blazor", label = "Blazor Web App" },
|
|
{ value = "xunit", label = "xUnit Test Project" },
|
|
]
|
|
default = "console"
|
|
|
|
[[fields]]
|
|
id = "lang"
|
|
label = "Language:"
|
|
type = "choice"
|
|
segmented = true
|
|
options = [{ value = "C#", label = "C#" }, { value = "F#", label = "F#" }]
|
|
default = "C#"
|
|
visible = { template = ["console", "classlib", "webapi", "mvc", "xunit"] }
|
|
|
|
[[steps]]
|
|
label = "Running dotnet new"
|
|
program = "dotnet"
|
|
args = [
|
|
"new", "{{template}}", "--name", "{{name}}", "--output", ".",
|
|
{ when = { template = ["console", "classlib", "webapi", "mvc", "xunit"] }, args = ["--language", "{{lang}}"] },
|
|
]
|
|
env = { DOTNET_CLI_TELEMETRY_OPTOUT = "1", DOTNET_NOLOGO = "1" }
|
|
|
|
[[after]]
|
|
label = "Adding a .gitignore"
|
|
program = "dotnet"
|
|
args = ["new", "gitignore"]
|
|
env = { DOTNET_CLI_TELEMETRY_OPTOUT = "1", DOTNET_NOLOGO = "1" }
|
|
optional = true
|