MCPcopy
hub / github.com/vercel/next-forge / getName

Function getName

scripts/initialize.ts:182–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

180};
181
182const getName = async () => {
183 const value = await text({
184 message: "What is your project named?",
185 placeholder: "my-app",
186 validate(value: string) {
187 if (value.length === 0) {
188 return "Please enter a project name.";
189 }
190 },
191 });
192
193 if (isCancel(value)) {
194 cancel("Operation cancelled.");
195 process.exit(0);
196 }
197
198 return value.toString();
199};
200
201const getPackageManager = async (): Promise<PackageManagerName> => {
202 const detected = await detectPackageManager(process.cwd());

Callers 1

initializeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected