Skip to content

Latest commit

 

History

History
63 lines (38 loc) · 1.57 KB

start-fresh.md

File metadata and controls

63 lines (38 loc) · 1.57 KB

Start fresh

How to generate a new extension from scratch

These were the steps followed to create this project. If you don't want to use this repo directly, you can create a new project using an official template.

For more info, see the Your First Extension doc page.

Pick a repo workspace

You don't need to create a new directory. Start from your usual repos directory.

$ cd ~/repos

Generate the extension

Install Node.

Run this command to use NPX - it will fetch and run a package without installing it.

In this case we use Yeoman (yo) and the template we request is for VS Code.

$ npm install -g yo generator-code
$ yo code

You'll then get promoted for input.

Enter answers in the REPL - questions and answers for example:

# ? What type of extension do you want to create? New Extension (TypeScript)
# ? What's the name of your extension? HelloWorld
### Press <Enter> to choose default for all options below ###

# ? What's the identifier of your extension? helloworld
# ? What's the description of your extension? LEAVE BLANK
# ? Initialize a git repository? Yes
# ? Which package manager to use? npm

That will also install packages for you so you don't event have to run install.

Open

Open your new project in VS Code

$ code helloworld

How to run the extension

Now you can start the extension with the debugger in an isolated environment.

To do this, follow the steps in the usage section of this quickstart guide.