Skip to content

Commit 7204659

Browse files
authored
Update Readme fixes #116 (#123)
* Update Readme fixes #116 * Update README.md
1 parent 32338c6 commit 7204659

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

+31
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,37 @@ mocha -r ts-node/register -r tsconfig-paths/register "test/**/*.ts"
5252

5353
As long as the command has something similar to a `--require` option that can load a module before it starts, tsconfig-paths should be able to work with it.
5454

55+
### With `ts-node` and VSCode
56+
57+
The following is an example configuration for the `.vscode/launch.json`.
58+
59+
``` js
60+
{
61+
"version": "0.2.0",
62+
"configurations": [
63+
{
64+
"name": "Debug Functions",
65+
"request": "launch",
66+
"type": "node",
67+
"runtimeArgs": [
68+
"-r",
69+
"${workspaceFolder}/functions/node_modules/ts-node/register",
70+
"-r",
71+
"${workspaceFolder}/functions/node_modules/tsconfig-paths/register"
72+
],
73+
"args": ["${workspaceFolder}/functions/src/index.ts"],
74+
"cwd": "${workspaceFolder}",
75+
"protocol": "inspector",
76+
"env": {
77+
"NODE_ENV": "development",
78+
"TS_NODE_PROJECT": "${workspaceFolder}/functions/tsconfig.json"
79+
},
80+
"outFiles": ["${workspaceFolder}/functions/lib/**/*.js"]
81+
}
82+
]
83+
}
84+
```
85+
5586
## Bootstrapping with explicit params
5687

5788
If you want more granular control over tsconfig-paths you can bootstrap it. This can be useful if you for instance have compiled with `tsc` to another directory where `tsconfig.json` doesn't exists.

0 commit comments

Comments
 (0)