From bbff7403fbf46f9ad92240ac213df8d30ef31b64 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 20 Sep 2018 02:56:13 +0200 Subject: update packages --- node_modules/source-map-support/README.md | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'node_modules/source-map-support/README.md') diff --git a/node_modules/source-map-support/README.md b/node_modules/source-map-support/README.md index 0f51b5cca..0e85cc1ac 100644 --- a/node_modules/source-map-support/README.md +++ b/node_modules/source-map-support/README.md @@ -11,13 +11,7 @@ This module provides source map support for stack traces in node via the [V8 sta $ npm install source-map-support ``` -Source maps can be generated using libraries such as [source-map-index-generator](https://github.com/twolfson/source-map-index-generator). Once you have a valid source map, insert the following line at the top of your compiled code: - -```js -require('source-map-support').install(); -``` - -And place a source mapping comment somewhere in the file (usually done automatically or with an option by your transpiler): +Source maps can be generated using libraries such as [source-map-index-generator](https://github.com/twolfson/source-map-index-generator). Once you have a valid source map, place a source mapping comment somewhere in the file (usually done automatically or with an option by your transpiler): ``` //# sourceMappingURL=path/to/source.map @@ -27,7 +21,23 @@ If multiple sourceMappingURL comments exist in one file, the last sourceMappingU respected (e.g. if a file mentions the comment in code, or went through multiple transpilers). The path should either be absolute or relative to the compiled file. -It is also possible to to install the source map support directly by +From here you have two options. + +##### CLI Usage + +```bash +node -r source-map-support/register compiled.js +``` + +##### Programmatic Usage + +Put the following line at the top of the compiled file. + +```js +require('source-map-support').install(); +``` + +It is also possible to install the source map support directly by requiring the `register` module which can be handy with ES6: ```js -- cgit v1.2.3