Skip to content

Create new TypeScript folder commandΒ #126105

Closed as not planned
Closed as not planned

Description

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 Gabrielle Crevecoeur (@gcrev93) Jackson Kearl (@JacksonKearl) @misolori Daniel Rosenwasser (@DanielRosenwasser)

Activity

  1. orta commented on Jun 14, 2021

    @orta
    Contributor

    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)

  2. DanielRosenwasser commented on Jun 14, 2021

    @DanielRosenwasser
    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 Therox (@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)?

  3. digitarald commented on Jan 4, 2024

    @digitarald
    ContributorAuthor

    More investment into this might happen via Copilot Chat.

  4. locked and limited conversation to collaborators on Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions