observablehq / framework

A static site generator for data apps, dashboards, reports, and more. Observable Framework combines JavaScript on the front-end for interactive graphics with any language on the back-end for data analysis.
https://observablehq.com/framework/
ISC License
2.52k stars 121 forks source link

If an app is being created in the current dir, suggest the parent folder name as title #1663

Closed mootari closed 1 month ago

mootari commented 1 month ago

Framework derives the suggested default project title from the entered path. If the path is ".", then the default title is "." as well:

◇  Where should we create your project?
│  .
│
◆  What should we title your project?
│  .

Instead, inferTitle should arguably be passed the real path so that it can infer the title from the parent folder name: https://github.com/observablehq/framework/blob/18cee9b690e6fa9e6a180ff9a071cf88584201d9/src/create.ts#L62-L63

mootari commented 1 month ago

Related, the next steps also display the no-op cd .:

◇  Next steps… ─╮
│               │
│  cd .         │
│  npm run dev  │
│               │
├───────────────╯