Skip to content

Adds support for hooking up dev builds of TS to the playground #38859

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

Merged
merged 1 commit into from
Jul 6, 2020

Conversation

orta
Copy link
Contributor

@orta orta commented May 30, 2020

I've been building out more introspection tools into the playground (flow node analysis, AST viewers, and have quite a few more planned) and it's got to a point where I'd like to be able to use my local WIP build of TS in the Playground.

This PR adds a single script which

  • Listens to changes to the built version of TypeScript (via a filewatcher on built/local/typescriptServices.js) these trigger creating monaco-typescript compatible build of TypeScript services at internal/lib/typescriptServices.js

  • Creates a HTTP server which the playground uses. The webserver almost exclusively re-directs requests to
    the latest stable version of monaco-typescript from our CDN, but specifically overrides requests for the TypeScript js file to the version created in the above step.

Here's my dev build running on the playground showing the AST viewer:

Screen Shot 2020-05-30 at 7 30 02 AM

Works with microsoft/TypeScript-Website#651

@orta
Copy link
Contributor Author

orta commented May 30, 2020

This is now working on staging:
Screen Shot 2020-05-30 at 9 48 26 AM

@orta orta requested a review from sandersn May 30, 2020 13:56
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

Seems like a good feature, although I don't know much about the right way to write watchers and servers.

@orta
Copy link
Contributor Author

orta commented Jul 6, 2020

Cool, let's get this in.

@orta orta merged commit 3593c28 into microsoft:master Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants