1.0.0 • Published 9 years ago
generator-vscode-node-typescript v1.0.0
Adam Stephenson's Yeoman Generator for Node-TypeScript Projects Using Visual Studio Code
Using the Yeoman Generator
- Install Yeoman.
- Use npm to install Yeoman globally. - npm install -g yo
- Install the vscode-node-typescript generator.
- Use npm to install the generator globally. - npm install -g generator-vscode-node-typescript
- Create a directory for your new TypeScript project.
- Create the directory where you wish to place your TypeScript project.
- cdinto the directory you just created.- mkdir MyCoolTypeScriptProject cd MyCoolTypeScriptProject
- Use the vscode-node-typescript generator.
- Run the - vscode-node-typescriptYeoman generator.- For a list of optional parameters, add the --helpparameter.
- To prevent installation of dependencies, add the --skip-installparameter.
 - ~/source/MyCoolTypeScriptProject $ yo vscode-node-typescript _-----_ | | .--------------------------. |--(o)--| | Welcome to Tony Sneed's | `---------´ | Visual Studio Code | ( _´U`_ ) | TypeScript generator! | /___A___\ '--------------------------' | ~ | __'.___.'__ ´ ` |° ´ Y ` ? Application Name (my-cool-type-script-project)
- For a list of optional parameters, add the 
Using Visual Studio Code
- Open the TypeScript project in Visual Studio Code.
- Follow these instructions to set up VS Code: https://code.visualstudio.com/Docs/editor/setup
- Launch VS Code from the command line and follow instructions in the project's README.md file. - code .
- Compile TypeScript files.
- Pressing Cmd+Shift+B to compile TypeScript to JavaScript.- Notice that a dist folder appears with .jsfiles in it.
- Also included are sourcemaps and type defitions.
 
- Notice that a dist folder appears with 
- Run tests.
- Run the tests by pressing Cmd+Shift+T.- You should see results displayed in the Output window.
 
- Debug tests.
- Set a breakpoint on line 15 in greeter.spec.ts, then press Cmd+D to view debugging options.- Select Debug Current TypeScript Test from the dropdown and press F5 to launch the debugger.
- You should hit the breakpoint.
- Press F11 to step into greeter.greet().
- Press Shift+F5 to stop the debugger.
 
1.0.0
9 years ago