Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mohammadmd1383/vscode-tsc
Compile typescript in visual studio code without need of installing Node.js
https://github.com/mohammadmd1383/vscode-tsc
api compiler extension javascript node-js nodejs tsc tsconfig typescript visual-studio-code vscode vscode-extension
Last synced: 23 days ago
JSON representation
Compile typescript in visual studio code without need of installing Node.js
- Host: GitHub
- URL: https://github.com/mohammadmd1383/vscode-tsc
- Owner: MohammadMD1383
- License: mit
- Created: 2021-06-25T09:37:38.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-22T18:02:15.000Z (over 3 years ago)
- Last Synced: 2024-10-31T15:22:19.679Z (2 months ago)
- Topics: api, compiler, extension, javascript, node-js, nodejs, tsc, tsconfig, typescript, visual-studio-code, vscode, vscode-extension
- Language: TypeScript
- Homepage:
- Size: 10.8 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Visual Studio Code TypeScript Compiler
Compile typescript in visual studio code without need of installing **Node.js**
## Table Of Contents
- [Features](#features)
- [How To](#how-to)
- [Configurations](#configurations)
- [Extension API](#extension-api)
- [Notice](#notice)
- [Known Issues](#known-issues)### 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**[\*](#reference): compile a typescript project
- **Watch Project**[\*](#reference): use typescript `watch` feature to compile your project### How To
**Single Compilation**-**Live View**:
1. open any `.ts` file
2. click the 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!
---
*: needstsconfig.json
file to be in the root of typescript project