{"action":"created","issue":{"url":"https://api.github.com/repos/lautis/uglifier/issues/83","labels_url":"https://api.github.com/repos/lautis/uglifier/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/lautis/uglifier/issues/83/comments","events_url":"https://api.github.com/repos/lautis/uglifier/issues/83/events","html_url":"https://github.com/lautis/uglifier/issues/83","id":67659452,"number":83,"title":"Support for processing many input files into one uglified output with map","user":{"login":"cardil","id":540893,"avatar_url":"https://avatars.githubusercontent.com/u/540893?v=3","gravatar_id":"","url":"https://api.github.com/users/cardil","html_url":"https://github.com/cardil","followers_url":"https://api.github.com/users/cardil/followers","following_url":"https://api.github.com/users/cardil/following{/other_user}","gists_url":"https://api.github.com/users/cardil/gists{/gist_id}","starred_url":"https://api.github.com/users/cardil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cardil/subscriptions","organizations_url":"https://api.github.com/users/cardil/orgs","repos_url":"https://api.github.com/users/cardil/repos","events_url":"https://api.github.com/users/cardil/events{/privacy}","received_events_url":"https://api.github.com/users/cardil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/lautis/uglifier/milestones/2","html_url":"https://github.com/lautis/uglifier/milestones/3.0","labels_url":"https://api.github.com/repos/lautis/uglifier/milestones/2/labels","id":1301382,"number":2,"title":"3.0","description":"* drop support for Ruby 1.8 and remove dependency to JSON gem\r\n* better handling of source map arguments\r\n* parse and generate source maps as data URIs\r\n","creator":{"login":"lautis","id":19264,"avatar_url":"https://avatars.githubusercontent.com/u/19264?v=3","gravatar_id":"","url":"https://api.github.com/users/lautis","html_url":"https://github.com/lautis","followers_url":"https://api.github.com/users/lautis/followers","following_url":"https://api.github.com/users/lautis/following{/other_user}","gists_url":"https://api.github.com/users/lautis/gists{/gist_id}","starred_url":"https://api.github.com/users/lautis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lautis/subscriptions","organizations_url":"https://api.github.com/users/lautis/orgs","repos_url":"https://api.github.com/users/lautis/repos","events_url":"https://api.github.com/users/lautis/events{/privacy}","received_events_url":"https://api.github.com/users/lautis/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2015-09-11T16:11:28Z","updated_at":"2015-09-11T16:11:44Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-04-10T18:56:00Z","updated_at":"2015-09-11T17:06:24Z","closed_at":null,"body":"Uglifier should support processing of many input files to produce single minified output and source map.\r\n\r\nThis is original example from latest ugifyjs2 (https://github.com/mishoo/UglifyJS2):\r\n\r\n```shell\r\nuglifyjs /home/doe/work/foo/src/js/file1.js \\\r\n         /home/doe/work/foo/src/js/file2.js \\\r\n         -o foo.min.js \\\r\n         --source-map foo.min.js.map \\\r\n         --source-map-root http://foo.com/src \\\r\n         -p 5 -c -m\r\n```"},"comment":{"url":"https://api.github.com/repos/lautis/uglifier/issues/comments/139602732","html_url":"https://github.com/lautis/uglifier/issues/83#issuecomment-139602732","issue_url":"https://api.github.com/repos/lautis/uglifier/issues/83","id":139602732,"user":{"login":"lautis","id":19264,"avatar_url":"https://avatars.githubusercontent.com/u/19264?v=3","gravatar_id":"","url":"https://api.github.com/users/lautis","html_url":"https://github.com/lautis","followers_url":"https://api.github.com/users/lautis/followers","following_url":"https://api.github.com/users/lautis/following{/other_user}","gists_url":"https://api.github.com/users/lautis/gists{/gist_id}","starred_url":"https://api.github.com/users/lautis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lautis/subscriptions","organizations_url":"https://api.github.com/users/lautis/orgs","repos_url":"https://api.github.com/users/lautis/repos","events_url":"https://api.github.com/users/lautis/events{/privacy}","received_events_url":"https://api.github.com/users/lautis/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T17:06:24Z","updated_at":"2015-09-11T17:06:24Z","body":"This would be a nice addition. Let's see what could be done for 3.0.\r\n\r\nUglifyJS does not support the use case very well with source maps. Only one input source map is supported (https://github.com/mishoo/UglifyJS2/issues/145), but there is some work towards that in (https://github.com/mishoo/UglifyJS2/pull/706).\r\n\r\nOne option would be to use the inlined source map comments as suggested in UglifyJS issue. I've already done some work to deal with input source maps inlined as data URI comments, but am a bit hesitant to add logic for resolving external source definitions. Then Uglifier also had to deal with potential malicious file access and setting up proxies.\r\n\r\nSecond option is to use some other utility (like [mapcat](https://github.com/edc/mapcat)) to handle the concatenation as an optional preprocessing step. This could even be a separate gem, maybe even implemented in plain Ruby without ExecJS.\r\n\r\nAnd last, we could wait for the support for land to UglifyJS2 master, and figure out an API to give any number of files and source maps as input.\r\n\r\n\r\n\r\n"}}