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

Copy/update assets on compile #4765

Merged
merged 6 commits into from
Feb 7, 2025
Merged

Copy/update assets on compile #4765

merged 6 commits into from
Feb 7, 2025

Conversation

masenf
Copy link
Collaborator

@masenf masenf commented Feb 6, 2025

Allow updated assets to be copied into .web/public during _compile, so they can be used after hot reloading.

Particularly applies to CSS files passed to rx.App(stylesheets=[...]), which will fail SSG if the file is not found in .web/public.

Added some debug timing output for various parts of the compile.

Copy missing and newer files from src to dest
Log debug messages with timing for different processes.
If the assets change between hot reload, then update them before reloading (in
case a CSS file was added or something).
Copy link

codspeed-hq bot commented Feb 6, 2025

CodSpeed Performance Report

Merging #4765 will not alter performance

Comparing masenf/copy-assets (cd6cbc6) with main (b3b79a6)

Summary

✅ 8 untouched benchmarks

Lendemor
Lendemor previously approved these changes Feb 6, 2025
@masenf masenf merged commit 70920a6 into main Feb 7, 2025
39 checks passed
@masenf masenf deleted the masenf/copy-assets branch February 7, 2025 22:59
masenf added a commit that referenced this pull request Feb 8, 2025
* Add path_ops.update_directory_tree:

Copy missing and newer files from src to dest

* add console.timing context

Log debug messages with timing for different processes.

* Update assets tree as app._compile step.

If the assets change between hot reload, then update them before reloading (in
case a CSS file was added or something).

* Add timing for other app._compile events

* Only copy assets if assets exist

* Fix docstring for update_directory_tree
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.

2 participants