This repository contains a simple but ready-to-use configuration for developing with TypeScript in Visual Studio Code:
- TypeScript (2.7) is locally installed and configured:
- source folder is set to
src/
- output folder is set to
dist/
(including source maps) - target is set to
es6
(NodeJS 8) - strict mode is enabled
- source folder is set to
- VSCode (Default) Task Configuration
build
for compiling the source files todist/
- VSCode Debug Configuration
Run Main Application
for debugging the compiled application. Before the app is launched, it's compiled using thebuild
task - For formatting source code, Prettier in installed and enabled with line-length set to 130 (you might want to add Prettier VSCode extension)
yarn run clean
: removes thedist
folderyarn run build
: compiles TSCode fromsrc
todist
yarn watch
: build in watch mode: watch for changes insrc
and compile todist
yarn start
: runs the compiled application fromdist
yarn prettier
: re-formats all source code insrc