{"action":"created","issue":{"url":"https://api.github.com/repos/olov/ng-annotate/issues/161","labels_url":"https://api.github.com/repos/olov/ng-annotate/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/olov/ng-annotate/issues/161/comments","events_url":"https://api.github.com/repos/olov/ng-annotate/issues/161/events","html_url":"https://github.com/olov/ng-annotate/issues/161","id":74924649,"number":161,"title":"The `sourcemap` option doesn't combine source maps","user":{"login":"mzgol","id":1758366,"avatar_url":"https://avatars.githubusercontent.com/u/1758366?v=3","gravatar_id":"","url":"https://api.github.com/users/mzgol","html_url":"https://github.com/mzgol","followers_url":"https://api.github.com/users/mzgol/followers","following_url":"https://api.github.com/users/mzgol/following{/other_user}","gists_url":"https://api.github.com/users/mzgol/gists{/gist_id}","starred_url":"https://api.github.com/users/mzgol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mzgol/subscriptions","organizations_url":"https://api.github.com/users/mzgol/orgs","repos_url":"https://api.github.com/users/mzgol/repos","events_url":"https://api.github.com/users/mzgol/events{/privacy}","received_events_url":"https://api.github.com/users/mzgol/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-05-10T13:49:29Z","updated_at":"2015-05-27T20:10:23Z","closed_at":"2015-05-27T20:10:23Z","body":"Refs #79.\r\n\r\nI have a source file at `app/modules/init.js` that I first pass through babel & save as `app/.tmp/processed-pre-ng-annotate/modules/init.js` with inline source maps & then pass through `ng-annotate` (using `grunt-ng-annotate`) to `app/.tmp/processed/modules/init.js`. Source maps are not combined properly.\r\n\r\nThe following code combines fine:\r\n```\r\nng-annotate --add --sourcemap -o app/.tmp/processed/modules/init.js app/.tmp/processed-pre-ng-annotate/modules/init.js\r\n```\r\nThe following doesn't:\r\n```js\r\nngAnnotate(source, {\r\n    add: true,\r\n    remove: false,\r\n    single_quotes: true,\r\n    sourcemap: {\r\n        inline: true,\r\n        inFile: 'app/.tmp/processed-pre-ng-annotate/modules/init.js'\r\n    }\r\n});\r\n```\r\nthe map points to `app/.tmp/processed-pre-ng-annotate/modules/init.js`, the `sources` array in the map file points to this file as well. I've looked at what the binary does and it seems it uses a `map` property instead of the `sourcemap` one. I've checked and... the following works fine:\r\n```js\r\nngAnnotate(source, {\r\n    add: true,\r\n    remove: false,\r\n    single_quotes: true,\r\n    map: {\r\n        inline: true,\r\n        inFile: 'app/.tmp/processed-pre-ng-annotate/modules/init.js'\r\n    }\r\n});\r\n```\r\n\r\nThis duplication is weird; also, the `map` property is undocumented and the `sourcemap` one has this bug.\r\n\r\nNote that since `grunt-ng-annotate` uses the `sourcemap` property, combining maps doesn't work when used through this Grunt plugin.\r\n\r\nTested on `ng-annotate` `0.15.4`."},"comment":{"url":"https://api.github.com/repos/olov/ng-annotate/issues/comments/106058368","html_url":"https://github.com/olov/ng-annotate/issues/161#issuecomment-106058368","issue_url":"https://api.github.com/repos/olov/ng-annotate/issues/161","id":106058368,"user":{"login":"olov","id":19247,"avatar_url":"https://avatars.githubusercontent.com/u/19247?v=3","gravatar_id":"","url":"https://api.github.com/users/olov","html_url":"https://github.com/olov","followers_url":"https://api.github.com/users/olov/followers","following_url":"https://api.github.com/users/olov/following{/other_user}","gists_url":"https://api.github.com/users/olov/gists{/gist_id}","starred_url":"https://api.github.com/users/olov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olov/subscriptions","organizations_url":"https://api.github.com/users/olov/orgs","repos_url":"https://api.github.com/users/olov/repos","events_url":"https://api.github.com/users/olov/events{/privacy}","received_events_url":"https://api.github.com/users/olov/received_events","type":"User","site_admin":false},"created_at":"2015-05-27T20:10:23Z","updated_at":"2015-05-27T20:10:23Z","body":"Released in 1.0.0. Big thanks!"}}