{"action":"opened","issue":{"url":"https://api.github.com/repos/debugworkbench/hydragon/issues/4","labels_url":"https://api.github.com/repos/debugworkbench/hydragon/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/debugworkbench/hydragon/issues/4/comments","events_url":"https://api.github.com/repos/debugworkbench/hydragon/issues/4/events","html_url":"https://github.com/debugworkbench/hydragon/issues/4","id":116990393,"number":4,"title":"Replace grunt-babel with a more TypeScript friendly solution","user":{"login":"enlight","id":233003,"avatar_url":"https://avatars.githubusercontent.com/u/233003?v=3","gravatar_id":"","url":"https://api.github.com/users/enlight","html_url":"https://github.com/enlight","followers_url":"https://api.github.com/users/enlight/followers","following_url":"https://api.github.com/users/enlight/following{/other_user}","gists_url":"https://api.github.com/users/enlight/gists{/gist_id}","starred_url":"https://api.github.com/users/enlight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enlight/subscriptions","organizations_url":"https://api.github.com/users/enlight/orgs","repos_url":"https://api.github.com/users/enlight/repos","events_url":"https://api.github.com/users/enlight/events{/privacy}","received_events_url":"https://api.github.com/users/enlight/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/debugworkbench/hydragon/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-15T12:30:47Z","updated_at":"2015-11-15T12:30:47Z","closed_at":null,"body":"`grunt-babel` doesn't pass in source maps to Babel, so the source maps generated by TypeScript will not match the .js source output by Babel. Babel itself accepts source maps as input, so presumably it knows how to transform them along with the .js source files. Another problem with `grunt-babel` is that TypeScript writes out .js files, and then Babel overwrites them, it'd be better if the .js files were only written out to disk once. I haven't found an existing Grunt task that handles this sort of TypeScript->Babel workflow, so it looks like I'll have to write it myself.\r\n\r\n[grunt-babel](https://github.com/babel/grunt-babel) is a good reference on how to use the Babel API, as for TypeScript, the following references will be useful:\r\n- [Using the TypeScript Compiler API](https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API)\r\n- [dts-generator](https://github.com/enlight/dts-generator) makes use of the Compiler API, and I've previously messed around with it in my fork.\r\n- [ts-node](https://github.com/TypeStrong/ts-node) uses the TypeScript Language Service API, I may end up using this API for the \"watch\" feature (if I decide to implement it at some point)."}}