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

ux: transpile TypeScript and JavaScript code (beta-3.0) #482

Merged
merged 3 commits into from
May 23, 2023

Conversation

mortend
Copy link
Member

@mortend mortend commented May 18, 2023

ux: transpile TypeScript and JavaScript code

This will invoke the FuseJS transpiler on TypeScript tags and JavaScript
tags where Transpile is enabled, in all UX documents being compiled.

The transpiler will replace user-provided code (modern) with transpiled
code (ES5) compatible with our JavaScript engine, before the resulting
output is saved to disk.

engine: refactor FuseJS transpiler code

This makes it easier to reuse the transpiler functionality in other
parts of the code base, e.g. the UX compiler.

  • Add ITranspiler interface in Uno.Compiler.API
  • Extract LazyTranspiler and TranspilerServer classes
  • Pass LazyTranspiler down from BuildDriver and LibraryBuilder
  • Simplify BundleCache class

ux: source code clean-up

  • Remove needless qualifiers and whitespace
  • Remove unused code
  • Tabs -> spaces

* Remove needless qualifiers and whitespace
* Remove unused code
* Tabs -> spaces
This makes it easier to reuse the transpiler functionality in other
parts of the code base, e.g. the UX compiler.

* Add ITranspiler interface in Uno.Compiler.API
* Extract LazyTranspiler and TranspilerServer classes
* Pass LazyTranspiler down from BuildDriver and LibraryBuilder
* Simplify BundleCache class
This will invoke the FuseJS transpiler on TypeScript tags and JavaScript
tags where Transpile is enabled, in all UX documents being compiled.

The transpiler will replace user-provided code (modern) with transpiled
code (ES5) compatible with our JavaScript engine, before the resulting
output is saved to disk.
@mortend
Copy link
Member Author

mortend commented May 18, 2023

fuse-open/fuselibs#1472

@mortend mortend merged commit 08646bc into fuse-open:beta-3.0 May 23, 2023
@mortend mortend deleted the ux-transpiler branch May 23, 2023 15:30
mortend added a commit to mortend/uno that referenced this pull request May 29, 2023
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.

1 participant