From 0b7c70f7260fc48023aa6e1685f35547b1cca6f2 Mon Sep 17 00:00:00 2001 From: exvisory <37081854+exvisory@users.noreply.github.com> Date: Fri, 18 May 2018 08:50:36 +0100 Subject: [PATCH] Update README.md to clarify --source-map filename option (#3137) Clarify that the --source-map filename option does NOT change the source map output filename but does set the 'file' attribute within the output source map. This was already documented in the API section of the README so I just copied that to the CLI options section, and a fragment to the CLI summary. --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4d4ebae1..6d1cdf8f 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,8 @@ a double dash to prevent input files being used as option arguments: JS that was generated from some other original code. Specify "inline" if the source map is included within the sources. - `filename` Name and/or location of the output source. + `filename` Filename and/or location of the output source + (sets `file` attribute in source map). `includeSources` Pass this flag if you want to include the content of source files in the source map as sourcesContent property. @@ -149,7 +150,9 @@ debugging your compressed JavaScript. To get a source map, pass Additional options: -- `--source-map "filename=''"` to specify the name of the source map. +- `--source-map "filename=''"` to specify the name of the source map. The value of + `filename` is only used to set `file` attribute (see [the spec][sm-spec]) + in source map file. - `--source-map "root=''"` to pass the URL where the original files can be found. -- 2.34.1