KEMBAR78
Intro to JavaScript Tooling in Visual Studio Code | PPTX
Intro to JavaScript Tooling
in Visual Studio Code
@scott_addie
About VS Code
 Launched on April 29, 2015 at //Build/ conference
 Current = v1.2.1
 Free product
 Lightweight
 Microsoft’s 1st cross-platform code editor
2
 Based on GitHub’s Electron shell
 Designed by engineers who created:
 Eclipse @ IBM
 Monaco @ Microsoft
 Built w/ web technologies
About VS Code (cont.)
3
IDEEditor
“
”
Instead of making them [Linux
and Mac developers] go to
Windows, we want to meet
them where they are.
S. “Soma” Somasegar – Microsoft - Corporate VP of Developer Division
Quote retrieved from http://tcrn.ch/1PwSw1r
4
5
Git Repo Branch
Command Palette
Git Tools
Debugger
File Search
File Explorer
Output Window
Extensibility
marketplace.visualstudio.com/vscode
6
7
4 Notable JSON Configuration Files
8
File Name Location Common Uses
jsconfig.json Project root or subfolder Enable ECMAScript version
support
launch.json .vscode/ Debugger configuration
settings.json .vscode/ - or - %APPDATA%CodeUser Override editor settings
tasks.json .vscode/ Define custom tasks to run w/
built-in task runner
1. jsconfig.json
9
2. launch.json
10
3. settings.json
11
4. tasks.json
12
JSON Schema Support
schemastore.org/json/
13
package.json Schema Support
14
Library / Framework IntelliSense
 Reliance on type definitions
 Deprecated: TSD
 Shiny: Typings
 > npm install –g typings
 *.d.ts files provide metadata to editor
 Angular, Gulp, React, etc.
15
Enable IntelliSense via tsd
16
Enable IntelliSense via typings
17
IntelliSense in Action
18
let demo = + ;
Demo
Adding Node.js & Webpack Type Definitions
19
JS Task Runners
 Command Palette
 Discoverable
 Launchable
 1st class support for:
 Grunt
 Gulp
 Jake
 Terminate running tasks:
 >Tasks: Terminate Running Task
20
Task Output
21
let demo = + ;
Demo
Discovering, Launching, & Debugging Gulp Tasks
22
Native Task Runner
 VS Code has its own task runner
 Integrate w/ 3rd party tools:
 Babel
 Webpack
 etc.
 isBuildCommand property ties to Shift + Ctrl + B gesture
 isTestCommand property ties to Shift + Ctrl + T gesture
23
Babel Transpilation Task
tasks.json
24
let demo = + ;
Demo
Running Custom Webpack Build Task
25
Node.js Debugging
launch.json
 Default launch configuration provided:
26
Node.js Debugging (cont.)
 3 easy steps:
1. Configure launch.json for Node.js debugging
2. Launch Node.js program:
 node --debug-brk program.js
3. Attach VS Code debugger to running program
 --debug and --debug-brk supported
 --debug-brk stops on 1st line of program
27
let demo = + ;
Demo
Debugging Mocha Unit Tests: Attach to Node Process
28
Resources
 Best of VS Code: Tips and Tricks
 Build 2016 session
 VS Code Docs
 VS Code Source on GitHub
 Visual Studio Code
 John Papa, Pluralsight course
 VS Code ES6 Sample Project
29
Thank you!
 Scan QR for slides:
30
 GitHub.com/scottaddie/slide-decks
 ScottAddie.com
 @Scott_Addie
 LinkedIn.com/in/scottaddie

Intro to JavaScript Tooling in Visual Studio Code

Editor's Notes

  • #3 1.0 release on 4/14/16
  • #7 - v0.10.1 and above