Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build using TypeScript project references #1984

Merged
merged 5 commits into from
Mar 30, 2019

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Mar 30, 2019

The performance of project references is at a level where we can actually use them now, this change vastly simplifies out build process by essentially having a "solution" file whose job it is to build the other sub-projects (xterm.js and the addons). The dependencies look like this:

src/tsconfig.all.json
  src/tsconfig.json
    src/core/tsconfig.json
      src/common/tsconfig.json
    src/common/tsconfig.json
  src/addons/attach/tsconfig.json
  src/addons/...

The vision here is that once the layering refactor is complete for it to look like this:

src/tsconfig.json (does nothing but links to projects to build)
  src/public/tsconfig.json
    src/ui/tsconfig.json
      src/common/tsconfig.json
    src/core/tsconfig.json
      src/common/tsconfig.json
    src/common/tsconfig.json
  src/addons/attach/tsconfig.json
  src/addons/...

Other things this PR does:

  • Updates TS to 3.4
  • Tweaks how the CSS build step works and removes our need for concurrently which will fix yarn is eating following commands #1639, part of this was moving the demo to depend on src/ directly instead of build/
  • Removed the need for the layering step, strict checks for core/common are performed as part of the regular watch
  • Removes addon watch, there is a single yarn watch which will also watch for changes in addons and update that project only if a file change occurs
  • Removed the zmodem demo, no one maintains it and we'll be removing the zmodem addon with the upcoming layering/addon changes
  • There is a base and a library-base tsconfig which other tsconfigs extend in order to reduce duplication

Fixes #1337
Fixes #1639

Recent versions of TypeScript has improved the performance of project
references so they are now viable to switch over to.
@Tyriar Tyriar added this to the 3.13.0 milestone Mar 30, 2019
@Tyriar Tyriar self-assigned this Mar 30, 2019
@Tyriar Tyriar merged commit 7504623 into xtermjs:master Mar 30, 2019
@Tyriar Tyriar deleted the project_references branch March 30, 2019 22:09
@Tyriar Tyriar mentioned this pull request May 10, 2019
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yarn is eating following commands Use project references coming in TypeScript v3
1 participant