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

Create build service to utilize the router and move logic away from command #174

Merged
merged 64 commits into from
Jul 4, 2022

Conversation

caendesilva
Copy link
Member

This update refactors the static site building process to handle logic in a service, to fix #169.

As part of this refactor, the build loop no longer pulls data from the collection service, instead, the route index provided by the new Router serves as the origin of truth for what files to compile.

The rebuild service has not yet been refactored.

Since this PR works on a rather large change I will first port the build command code, then refactor to use the router
Protected methods are obviously internal and don't need an annotation.
Update HydeBuildStaticSiteCommand.php
@caendesilva caendesilva linked an issue Jul 4, 2022 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jul 4, 2022

Codecov Report

Merging #174 (20b0218) into master (e044386) will not change coverage.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##              master      #174   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity       770       778    +8     
===========================================
  Files            100       100           
  Lines           1996      2019   +23     
===========================================
+ Hits            1996      2019   +23     
Impacted Files Coverage Δ
packages/framework/src/StaticPageBuilder.php 100.00% <ø> (ø)
...mework/src/Commands/HydeBuildStaticSiteCommand.php 100.00% <100.00%> (ø)
.../Internal/TransfersMediaAssetsForBuildCommands.php 100.00% <100.00%> (ø)
packages/framework/src/Modules/Routing/Route.php 100.00% <100.00%> (ø)
packages/framework/src/Modules/Routing/Router.php 100.00% <100.00%> (ø)
packages/framework/src/Services/BuildService.php 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e044386...20b0218. Read the comment docs.

@caendesilva caendesilva marked this pull request as ready for review July 4, 2022 18:04
@caendesilva caendesilva merged commit 0beb905 into master Jul 4, 2022
@caendesilva caendesilva deleted the create-build-service branch July 4, 2022 18:04
@caendesilva caendesilva mentioned this pull request Jul 4, 2022
11 tasks
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.

Move the build loop to a service
2 participants