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

compile with swc for non-watchmode builds #46

Merged
merged 2 commits into from
Sep 19, 2020
Merged

compile with swc for non-watchmode builds #46

merged 2 commits into from
Sep 19, 2020

Conversation

ryanatkn
Copy link
Owner

@ryanatkn ryanatkn commented Sep 19, 2020

This continues the work started in #45 and adds a new compile task and standalone module that perform one-off builds of the source tree to the build directory. It replaces the usage of the TypeScript compiler in non-watchmode in the two places it makes sense.

So this:

await spawnProcess('node_modules/.bin/tsc');

becomes:

await compile(log);

With this change, Gro's cold startup time in projects with a clean build directory drops dramatically. TypeScript compilation is the large majority of the work performed in that scenario, and this speeds things up by about a factor of 100 on my machine.

@ryanatkn ryanatkn merged commit 090260d into master Sep 19, 2020
@ryanatkn ryanatkn deleted the compile-swc branch September 19, 2020 15:22
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