diff options
author | David Šanda <sanda.david@gmail.com> | 2017-08-29 17:49:20 +0200 |
---|---|---|
committer | Alex Lam S.L <alexlamsl@gmail.com> | 2017-08-29 23:49:20 +0800 |
commit | eb7adaa6fc52cca3766b876745895eb2047ee323 (patch) | |
tree | e393d8ac3c9c57ae3898a3aecbd4c057cd4e9ed8 /README.md | |
parent | e5cf7972eab25581f9aa020bc8dbdd8bf25743cb (diff) | |
download | tracifyjs-eb7adaa6fc52cca3766b876745895eb2047ee323.tar.gz tracifyjs-eb7adaa6fc52cca3766b876745895eb2047ee323.zip |
Fix CLI source-maps examples (#2291)
fixes #2284
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -150,19 +150,19 @@ debugging your compressed JavaScript. To get a source map, pass Additional options: -- `--source-map filename=<NAME>` to specify the name of the source map. +- `--source-map "filename='<NAME>'"` to specify the name of the source map. -- `--source-map root=<URL>` to pass the URL where the original files can be found. +- `--source-map "root='<URL>'"` to pass the URL where the original files can be found. Otherwise UglifyJS assumes HTTP `X-SourceMap` is being used and will omit the `//# sourceMappingURL=` directive. -- `--source-map url=<URL>` to specify the URL where the source map can be found. +- `--source-map "url='<URL>'"` to specify the URL where the source map can be found. For example: uglifyjs js/file1.js js/file2.js \ -o foo.min.js -c -m \ - --source-map root="http://foo.com/src",url=foo.min.js.map + --source-map "root='http://foo.com/src',url='foo.min.js.map'" The above will compress and mangle `file1.js` and `file2.js`, will drop the output in `foo.min.js` and the source map in `foo.min.js.map`. The source @@ -181,8 +181,8 @@ CoffeeScript → compiled JS, UglifyJS can generate a map from CoffeeScript → compressed JS by mapping every token in the compiled JS to its original location. -To use this feature pass `--source-map content="/path/to/input/source.map"` -or `--source-map content=inline` if the source map is included inline with +To use this feature pass `--source-map "content='/path/to/input/source.map'"` +or `--source-map "content=inline"` if the source map is included inline with the sources. ## CLI compress options |