diff options
author | Richard van Velzen <rvanvelzen1@gmail.com> | 2015-08-07 14:12:41 +0200 |
---|---|---|
committer | Richard van Velzen <rvanvelzen1@gmail.com> | 2015-08-07 14:12:41 +0200 |
commit | 464a942a95395722b0a928168bd9494e1e858d0d (patch) | |
tree | 0a21b6a449a199ef786a8648dc311293d7e437cd /tools | |
parent | d7a4a4a462f5a9ff7a902fdf277701ddd9ae77d9 (diff) | |
parent | 4fba3e0b80c3d1a5df04fa524f550868443aa784 (diff) | |
download | tracifyjs-464a942a95395722b0a928168bd9494e1e858d0d.tar.gz tracifyjs-464a942a95395722b0a928168bd9494e1e858d0d.zip |
Merge pull request #736 from AlbertoGP/master
fromString option, use index from argument array for filename instead of "?"
Diffstat (limited to 'tools')
-rw-r--r-- | tools/node.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/node.js b/tools/node.js index 7bba3231..29d5632d 100644 --- a/tools/node.js +++ b/tools/node.js @@ -73,13 +73,13 @@ exports.minify = function(files, options) { } else { if (typeof files == "string") files = [ files ]; - files.forEach(function(file){ + files.forEach(function(file, i){ var code = options.fromString ? file : fs.readFileSync(file, "utf8"); sourcesContent[file] = code; toplevel = UglifyJS.parse(code, { - filename: options.fromString ? "?" : file, + filename: options.fromString ? i : file, toplevel: toplevel }); }); |