GithubHelp home page GithubHelp logo

isabella232 / vscode-generator-code Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/vscode-generator-code

0.0 0.0 0.0 2.27 MB

Visual Studio Code extension generator

License: Other

JavaScript 92.64% TypeScript 6.43% CSS 0.05% Jupyter Notebook 0.64% Dockerfile 0.24%

vscode-generator-code's Introduction

Yo Code - Extension and Customization Generator

Build Status

We have written a Yeoman generator to help get you started. We plan to add templates for most extension/customization types into this.

Install the Generator

Install Yeoman and the VS Code Extension generator:

npm install -g yo generator-code

Run Yo Code

The Yeoman generator will walk you through the steps required to create your customization or extension prompting for the required information.

To launch the generator simply type:

yo code

The command generator

Generator Output

These templates will

  • Create a base folder structure
  • Template out a rough package.json
  • Import any assets required for your extension e.g. tmBundles or the VS Code Library
  • For Extensions: Set-up launch.json for running your extension and attaching to a process

Command line

Usage:
  yo code [<destination>] [options]

Argument (optional):
  The destination to create the extension in, absolute or relative to the current working
  directory. Use '.' for the current folder.
  If not provided, defaults to a folder in the current working directory with the extension
  display name.

Options:
  -h,   --help                  # Print the generator's options and usage
  -i,   --insiders              # Show the insiders options for the generator
  -q,   --quick                 # Quick mode, skip all optional prompts and use defaults
  -o,   --open                  # Open the generated extension in Visual Studio Code
  -O,   --openInInsiders        # Open the generated extension in Visual Studio Code Insiders
  -t,   --extensionType         # ts, js, colortheme, language, snippets, keymap...
        --extensionId           # Id of the extension
        --extensionDescription  # Description of the extension
        --pkgManager            # 'npm', 'yarn' or 'pnpm'
        --webpack               # Bundle the extension with webpack
        --gitInit               # Initialize a git repo

Example usages:
  yo code                       # Create an extension in a folder with the extension's name.
  yo code . -O                  # Create an extension in current folder and open with code-insiders
  yo code Hello -t=ts -q        # Create an TypeScript extension in './Hello', skip prompts, use defaults.
  yo code --insiders            # Show the insiders options for the generator

Run Generator using Docker

If you don't want to install nodejs or any node packages, use this method to containerize the generator.

Go into your project directory

cd <project directory>

Build the docker image from the docker file

docker build -t vscode-generator-code .

Create a docker container with volumes

docker run -v $(pwd):/usr/src/app vscode-generator-code

Local development

After making necessary changes, run npm link before running yo code to test the local version.

You can learn more about Yeoman generator development on its documentation website.

History

  • 1.0.0: Generates a VS Code extension for TypeScript 2.0.3
  • 0.10.x: Generates a VS Code extension for TypeScript 1.8.10

License

MIT

vscode-generator-code's People

Contributors

adamvoss avatar aeschli avatar alefragnani avatar alexr00 avatar bpasero avatar chrisdias avatar connor4312 avatar dbaeumer avatar dependabot[bot] avatar dimitropoulos avatar egamma avatar elliottsj avatar gilmoreorless avatar hawkticehurst avatar isidorn avatar jakewitcher avatar joandrsn avatar joaomoreno avatar lramos15 avatar mjbvz avatar mrluje avatar nhedger avatar octref avatar rzhao271 avatar sibiraj-s avatar snpranav avatar tanhakabir avatar tomashubelbauer avatar tyriar avatar weinand avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.