validstart
Version:
ValidStart is a powerful and intuitive command-line interface (CLI) tool meticulously crafted to streamline the project setup process.
38 lines (30 loc) • 1.07 kB
text/typescript
import fs from "fs-extra";
import path from "path";
import chalk from "chalk";;
interface Options {
projectName: string;
projectType: string;
language: string;
framework: string;
selectedTools: string[];
}
export async function scaffoldFullstackJava(options: Options): Promise<void> {
const { projectName } = options;
const projectPath = path.resolve(process.cwd(), projectName);
console.log(chalk.cyan(`\n☕ Creating Java fullstack project with Spring + Thymeleaf`));
await fs.mkdirp(path.join(projectPath, "src"));
// You can expand this by using Spring Initializr API later
await fs.writeFile(
path.join(projectPath, "README.md"),
`# ${projectName}\nSpring Boot + Thymeleaf starter`,
);
await fs.writeFile(
path.join(projectPath, "index.txt"),
`You can generate Spring Boot project using Spring Initializr: https://start.spring.io/`,
);
console.log(
chalk.green(
`\n✅ Java Spring fullstack scaffold prepared. Manually download Spring ZIP if needed.`,
),
);
}