Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new TypeScript folder command #126105

Closed
digitarald opened this issue Jun 11, 2021 · 3 comments
Closed

Create new TypeScript folder command #126105

digitarald opened this issue Jun 11, 2021 · 3 comments
Assignees

Comments

@digitarald
Copy link
Contributor

Subset of #121345. 🚧 Draft to get discussions started.

As an addition to the planned "New …" #124304 contribution point, VS Code wants to make it easier to get started with TypeScript by generating a folder with all the necessary files. The script could introduce the key aspects of TS and VS Code's capabilities and provide a playground to try them out.

What could the user flow be?

The ecosystem of CLI tools for project bootstrapping is vivid across most languages. Every major JS/node project provides their own tool. VS Code's built-in Terminal would therefor be the perfect entry point for project creation.

  1. (Welcome) "New …" β†’ (Quick prompt) "TypeScript Starter"
  2. πŸ’ͺ Pick container or local folder
  3. Native dialog to pick a new or existing folder
  4. Attach VS Code window to selected folder
  5. Open Terminal with tsc --init command that guides the user through the wizard (frontend, backend, fullstack)
  6. The generated TS index file opens and contains a basic TS snippet hello world + next steps (how to run, complex, next steps) in comments

Other variations:

  • Open Terminal in current VS Code window and give the user the option to open the window when the command ran
  • Detect if node/npm is installed and guide user through the installation if needed

How should the entry point be called?

  • "New TypeScript Project"
    • πŸ‘ Often used for similar concepts
    • πŸ‘Ž Project is a overloaded term in code environments and not used in VS Code
  • "New TypeScript Configuration"
    • πŸ‘ TSConfig reference
    • Does not imply that it creates a new folder/workspace, but maybe could be run in an existing folder
  • "TypeScript Frontend" | "TypeScript Backend" | "TypeScript Fullstack"
    • πŸ‘ One for each to avoid naming it
    • πŸ‘ Makes the use case clearer for beginners
    • Not many languages are fullstack, so it wouldn't be a common pattern

cc @gcrev93 @JacksonKearl @misolori @DanielRosenwasser

@orta
Copy link
Contributor

orta commented Jun 14, 2021

Perhaps: "New TypeScript Node.js App" could be the name? That avoids the need to try and scope that you're going to provide a richer template like with Express etc, and Deno is growing (and would be a drastically simpler template, given that all you need there is the index.ts)

@DanielRosenwasser
Copy link
Member

Speaking from personal experience in VS, I always found the specific project types to be a bit "scary" because I was never sure if I'd get "stuck" with a project. Once you get something set up, can you reconfigure down the line? I don't think that's a blocker here, but it is something to maybe be aware of.

TypeScript Frontend / Backend / Fullstack is the only one that I think makes sense given the state of modules. I think there's still flexibility for a very minimal/lightweight scaffolding like @orta alluded to under that. I slightly prefer the current labels, but I'm not totally against going more specific with "Node.js App", but these could always be relabeled if need be.

Open Terminal in current VS Code window and give the user the option to open the window when the command ran

I know it might be "sloppy" to have too many windows open, but can you open a new editor window unless you have any files open (regardless of whether they're saved or unsaved)?

@digitarald
Copy link
Contributor Author

More investment into this might happen via Copilot Chat.

@digitarald digitarald closed this as not planned Won't fix, can't repro, duplicate, stale Jan 4, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants