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
73 lines
1.2 KiB
TOML
73 lines
1.2 KiB
TOML
id = "node"
|
|
name = "Node.js"
|
|
group = "JavaScript"
|
|
icon = "project-node"
|
|
description = "A minimal Node.js application."
|
|
|
|
[[requires]]
|
|
program = "node"
|
|
min = "22.18"
|
|
hint = "Install Node.js 22.18 or later: https://nodejs.org"
|
|
|
|
[[fields]]
|
|
id = "lang"
|
|
label = "Language:"
|
|
type = "choice"
|
|
segmented = true
|
|
options = [{ value = "ts", label = "TypeScript" }, { value = "js", label = "JavaScript" }]
|
|
default = "ts"
|
|
|
|
[[files]]
|
|
path = "package.json"
|
|
content = '''
|
|
{
|
|
"name": "{{name|kebab}}",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"start": "node src/index.{{lang}}",
|
|
"test": "node --test"
|
|
}
|
|
}
|
|
'''
|
|
|
|
[[files]]
|
|
path = "src/index.{{lang}}"
|
|
content = '''
|
|
const greeting: string = "Hello, World!";
|
|
console.log(greeting);
|
|
'''
|
|
when = { lang = "ts" }
|
|
|
|
[[files]]
|
|
path = "src/index.{{lang}}"
|
|
content = '''
|
|
console.log("Hello, World!");
|
|
'''
|
|
when = { lang = "js" }
|
|
|
|
[[files]]
|
|
path = "tsconfig.json"
|
|
when = { lang = "ts" }
|
|
content = '''
|
|
{
|
|
"compilerOptions": {
|
|
"target": "esnext",
|
|
"module": "nodenext",
|
|
"strict": true,
|
|
"noEmit": true,
|
|
"allowImportingTsExtensions": true,
|
|
"erasableSyntaxOnly": true,
|
|
"verbatimModuleSyntax": true
|
|
},
|
|
"include": ["src"]
|
|
}
|
|
'''
|
|
|
|
[[files]]
|
|
path = ".gitignore"
|
|
content = '''
|
|
node_modules/
|
|
'''
|