UNPKG

next-start-cli

Version:

This is a CLI tool to create a nextjs project and add the necessary dependencies and configurations

32 lines (28 loc) 655 B
import inquirer from "inquirer"; export let projectName; export let nextJsVersion; export const getProjectDetails = async () => { const questions = [ { type: "input", name: "projectName", message: "Enter the project name:", required: true, default() { return "my-app"; }, }, { type: "input", name: "nextJsVersion", message: "Enter the Next.js version: ", default() { return "latest"; }, }, ]; const answers = await inquirer.prompt(questions); projectName = answers.projectName; nextJsVersion = answers.nextJsVersion; return projectName; };