aboutsummaryrefslogtreecommitdiff
path: root/node_modules/source-map-support/README.md
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
commitbbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch)
treec58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/source-map-support/README.md
parent003fb34971cf63466184351b4db5f7c67df4f444 (diff)
update packages
Diffstat (limited to 'node_modules/source-map-support/README.md')
-rw-r--r--node_modules/source-map-support/README.md26
1 files changed, 18 insertions, 8 deletions
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