@@ -48,7 +48,7 @@ For other editors, make sure you have the corresponding [TypeScript plugin](http
48
48
49
49
## Project Structure
50
50
The most obvious difference in a TypeScript + Node project is the folder structure.
51
- In a TypeScript project, you it's best to have separate _ source_ and _ distributable_ files.
51
+ In a TypeScript project, it's best to have separate _ source_ and _ distributable_ files.
52
52
TypeScript (` .ts ` ) files live in your ` src ` folder and after compilation are output as JavaScript (` .js ` ) in the ` dist ` folder.
53
53
The ` test ` and ` views ` folders remain top level as expected.
54
54
@@ -66,7 +66,7 @@ The full folder structure of this app is explained below:
66
66
| ** src/controllers** | Controllers define functions that respond to various http requests |
67
67
| ** src/models** | Models define Mongoose schemas that will be used in storing and retrieving data from MongoDB |
68
68
| ** src/public** | Static assets that will be used client side |
69
- | ** src/types** | Holds .d.ts files not found on DefinitelyTyped. Covered more in this [ section] ( # ) |
69
+ | ** src/types** | Holds .d.ts files not found on DefinitelyTyped. Covered more in this [ section] ( #type-definition-dts-files ) |
70
70
| ** src** /server.ts | Entry point to your express app |
71
71
| ** test** | Contains your tests. Seperate from source because there is a different build process. |
72
72
| ** views** | Views define how your app renders on the client. In this case we're using pug |
@@ -291,7 +291,7 @@ This is mostly identical to the "Node.js: Launch Program" template with a couple
291
291
| ` "program": "${workspaceRoot}/dist/server.js", ` | Modified to point to our entry point in ` dist ` |
292
292
| ` "smartStep": true, ` | Won't step into code that doesn't have a source map |
293
293
| ` "outFiles": [...] ` | Specify where output files are dropped. Use with source maps |
294
- | ` "protocol": inspector, ` | Use the new Node debug protocal because we're on the latest node|
294
+ | ` "protocol": inspector, ` | Use the new Node debug protocol because we're on the latest node|
295
295
296
296
With this file in place, you can hit ` F5 ` to serve the project with the debugger already attached.
297
297
Now just set your breakpoints and go!
@@ -397,10 +397,10 @@ In that file you'll find two sections:
397
397
| Package | Description |
398
398
| ------------------------------- | --------------------------------------------------------------------- |
399
399
| concurrently | Utility that manages multiple concurrent tasks. Used with npm scripts |
400
- | jest | Reports real-time server metrics for Express. |
401
- | node-sass | GitHub API library. |
400
+ | jest | Testing library for JavaScript. |
401
+ | node-sass | Allows to compile .scss files to .css |
402
402
| supertest | HTTP assertion library. |
403
- | ts-test | Instagram API library. |
403
+ | ts-test | A preprocessor with sourcemap support to help use TypeScript wit Jest. |
404
404
| tslint | Linter (similar to ESLint) for TypeScript files |
405
405
| typescript | JavaScript compiler/type checker that boosts JavaScript productivity |
406
406
0 commit comments