mishoo/UglifyJS2 — pull request #324 by eleith (2013-10-24 07:41:00+00:00)
Title: declare a source file even when passing in a string

when generating source maps by using the fromString=true in the Uglify.minify options, the source map contains a problematic array for the sources field

```javascript
...
sources: ["?"],
...
```

thus, the source map can't be used because i can't point it at the original source. however, if i do not use a string directly but the filename itself, the source map feature works.

this pull request adds a fromFile option that can either be an array of filenames or just a single string filename to properly match up if just a single string of source code is passed in, or an array of source code.

so the following approaches now produce good source maps

```javascript
Uglifyjs.minify(
"function() { alert('yes');",
{fromString:true, fromFile:"yes.js"});
```

and

```javascript
Uglifyjs.minify(
["function() { alert('yes');", "function() { alert('no');"],
{fromString:true, fromFile:["yes.js", "no.js"]});
```