Git Product home page Git Product logo

vscode-tsc's Introduction

Visual Studio Code TypeScript Compiler

Compile typescript in visual studio code without need of installing Node.js

Table Of Contents

Features

  • Single Compilation: compile any typescript file without need of being in a typescript project:
    • see in vscode output
    • compile it next to current typescript file
    • compile it anywhere you want
  • Live View: see the compiled javascript next to typescript as you edit
  • Compile Project*: compile a typescript project
  • Watch Project*: use typescript watch feature to compile your project

How To

Single Compilation-Live View:

  1. open any .ts file
  2. click the Image icon at top right of editor
  3. choose the compilation mode

Compile Project:

  1. open a vscode workspace(folder)
  2. add a tsconfig.json file at the root of your typescript files
  3. a status bar item appears (Compile Project)
  4. click on that and your project will be compiled

Watch Project:

  1. follow steps 1 and 2 of previous section
  2. right click on tsconfig.json file
  3. click Watch Project and your project will be watched
    • open commands by pressing F1
      • destroy watch: destroys an active watch
      • show active watches: shows the current active watches

Configurations

  • Single Compilation Configurations
    • vscode-tsc.singleCompilationCompilerOptions.module
    • vscode-tsc.singleCompilationCompilerOptions.target
    • vscode-tsc.singleCompilationCompilerOptions.strict
    • vscode-tsc.singleCompilationCompilerOptions.removeComments

Extension API

This extension provides some commands that can be used by other extensions

Current Commands:

  • vscode-tsc.api.transpileModule
    • parameters
      • string source: typescript code
      • ts.TranspileOptions options: options for compilation
    • returns: string: compiled javascript

Notice

  • for now only CompilerOptions in tsconfig.json is supported and other configurations will be ignored

Known Issues

  • nothing yet!

*: needs tsconfig.json file to be in the root of typescript project

vscode-tsc's People

Contributors

mohammadmd1383 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.