Progress logs for templated pages
Description
#1852
Implement feature as a Vite plugin to count markdown files in the pages directory and compare them with the number of pages built during the Vite build process. This will provide the build progression percentage specifically for templated pages.
⚠️ No Changeset found
Latest commit: d81f93fc53bcf852577c6a167a9abf9b61889150
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 12, 2024 1:16pm |
Deploy Preview for evidence-development-workspace ready!
| Name | Link |
|---|---|
| Latest commit | d81f93fc53bcf852577c6a167a9abf9b61889150 |
| Latest deploy log | https://app.netlify.com/sites/evidence-development-workspace/deploys/661ba694b40e8b0008df6621 |
| Deploy Preview | https://deploy-preview-1859--evidence-development-workspace.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Epic, thank you!
[wip]
Goal: Forked childprocess tracks the progess on each template file (route)
Used blessed for the terminal ui
After the modules are transformed, the childprocess's stdout is shown on the terminal, while the parent's stdout is redirected to log file in /tmp so that the logs from the parent doesn't ruin the UI. Happens at the very last stage of the build process.
Should I progress further or is it complicating a very trivial thing?
https://github.com/evidence-dev/evidence/assets/60285613/ac60935b-92e0-408a-a688-25d3626f0512
Should I progress further or is it complicating a very trivial thing?
My instinct is this is a lot of additional LoC and some more deps for a useful, but not essential feature.
Is there a simpler approach we can run using something like fs or chokidar - existing dep?
If it makes it easier, I'm not sure it's essential to know "percentage complete" vs just the number of pages built so far
Deploy Preview for next-docs-evidence ready!
| Name | Link |
|---|---|
| Latest commit | d81f93fc53bcf852577c6a167a9abf9b61889150 |
| Latest deploy log | https://app.netlify.com/sites/next-docs-evidence/deploys/661ba6944d6e790008fc750e |
| Deploy Preview | https://deploy-preview-1859--next-docs-evidence.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
- Routes for template pages are constructed.
- A single chokidar watcher is set with depth calculated from the routes.
- Rollup's buildEnd hook was ineffective, so a 60sec countdown is created to return control from the plugin to the caller so the build proceeds.
https://github.com/evidence-dev/evidence/assets/60285613/3fe879a8-f77c-4894-b039-6235d5223960
Big fan of this feature - overall this PR looks good, but I don't think the plugin connector is the best place to land it. Need to think on this a bit more to figure out where to slot it
I've logged this as an issue in #2258, I'm going to close this until it can be re-addressed in that issue, but this is a great feature and we appreciate the submission!