Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Rework Build System #761

Closed
wants to merge 3 commits into from
Closed

Rework Build System #761

wants to merge 3 commits into from

Conversation

jkillian
Copy link
Contributor

The build flow is now TS [-> via TypeScript ->] ES6 [-> via Babel ->] ES5

There are a few benefits to this commit:

  • It fixes Fix Interop with CommonJS Usage #760. Why? ES6 modules export their default content as a member called default. When we switched over in Modularize #726 to ES6 modules we introduced this problem for CommonJS consumers. Babel has a special feature that fixes this. So, we use TS then Babel to get the result we want.
  • The compilation now uses our tsconfig.json files to determine compilation options. This makes things more consistent across IDE and builds, there's no longer two separate sets of files and options to maintain.
  • Related to the previous point, our build now updates the files field of our tsconfig.json files automatically. No more manually adding files or adding files through a special IDE feature! This means that only filesGlob should be adjusted manually.

There are a few other minor tweaks, but the points above are the major parts of this PR

Jason Killian added 2 commits October 29, 2015 17:13
Build flow is now TS [-> via TypeScript ->] ES6 [-> via Babel ->] ES5

// hack to correctly import JS module that uses module.exports = function(){...}
import * as findupSync from "findup-sync";
const findup = (<any>findupSync).default;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weswigham Do you know if there's a better way to do this when targeting ES6 and then using Babel?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I think adjusting the typings is the best bet here

@jkillian
Copy link
Contributor Author

Whoops, this should merge into master and not next. Closing this in favor of #762

@jkillian jkillian closed this Oct 30, 2015
@jkillian jkillian deleted the babel branch October 30, 2015 19:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants