aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorDavid Šanda <sanda.david@gmail.com>2017-08-29 17:49:20 +0200
committerAlex Lam S.L <alexlamsl@gmail.com>2017-08-29 23:49:20 +0800
commiteb7adaa6fc52cca3766b876745895eb2047ee323 (patch)
treee393d8ac3c9c57ae3898a3aecbd4c057cd4e9ed8 /README.md
parente5cf7972eab25581f9aa020bc8dbdd8bf25743cb (diff)
downloadtracifyjs-eb7adaa6fc52cca3766b876745895eb2047ee323.tar.gz
tracifyjs-eb7adaa6fc52cca3766b876745895eb2047ee323.zip
Fix CLI source-maps examples (#2291)
fixes #2284
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/README.md b/README.md
index 8db77e57..15d8d7c7 100644
--- a/README.md
+++ b/README.md
@@ -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