Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

TypeScript then babel #72

Merged
merged 3 commits into from May 1, 2017

Conversation

fasterthanlime
Copy link
Contributor

@fasterthanlime fasterthanlime commented Apr 30, 2017

The original idea is 100% pure @paulcbetts tweetery, but I'm doing it for other selfish purposes.

Paul wanted to target a recent runtime (es2017?) with typescript and have babel fill in the gaps (with as few transformations as possible).

I'm just personally really pissed off at native async/await stacktraces being completely broken, so I wanted to go back to our previous strategy of turning async/await into Bluebird coroutines using babel.

Anyway, this pull request:

  • Accepts a new configuration key, babel, for the typescript compiler
  • Passes that config value (must be an object) wholesale, to the babel compiler (effectively what you'd put in your .babelrc, which electron-compilers ignores willingly afaict)
  • Makes babel compile typescript's output, and combines both sourcemaps with sorcery
  • Include the final sourcemap in the generated file, as an inline sourcemap

Note that this expects both typescript & babel to have (external) sourcemaps enabled.

I'm not sure it's mergeable as-is, but it's a start?!

@anaisbetts anaisbetts merged commit 9cf9071 into electron-userland:master May 1, 2017
@anaisbetts
Copy link
Contributor

bless u @fasterthanlime, bless u

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants