Migrate layout to Typescript#2447
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2447 +/- ##
==========================================
+ Coverage 48.92% 48.95% +0.02%
==========================================
Files 124 124
Lines 5245 5248 +3
Branches 1110 1110
==========================================
+ Hits 2566 2569 +3
- Misses 2371 2374 +3
+ Partials 308 305 -3 ☔ View full report in Codecov by Sentry. |
Haha, sure; Will open a new PR with the same modification ASAP. Actually the third commit is added right during our meeting today; Unsure of whether I could press "update this branch" instead of Sorry for the trouble and appreciate your help in pointing me to the exact part in the DG. |
|
My bad @yiwen101 ! While generally you can press update this branch, you need to take particular care for typescript migration due to our established workflow, and I didn't realize the context when I gave that advice (I think if you had clicked update this branch with rebase it would have been okay) Normally, it doesn't matter because PRs are squash-merged, but in this case it does since we're trying to preserve the doc history. |
Noted, thank you for the detailed explaination! |
What is the purpose of this pull request?
work on #1913. Credit to #2164 for some of the works. Did not commit to #2164 to avoid the git rebase issues currently haunting it.
Overview of changes:
Update the use of layout manager in Site and Page;
Added two more types: LayoutConfig and PageNjkAssets to avoid any
Fix some nits/bugs? along the way:
in Site:
await this.layoutManager.updateLayouts(filePath)
=>
await this.layoutManager.updateLayouts(filePathArray)
and in Layout.ts
generateDependencies(pageSources.getDynamicIncludeSrc(),
this.includedFiles)
=>
await this.config.externalManager.generateDependencies(
pageSources.getDynamicIncludeSrc(),
this.includedFiles,
this.layoutUserScriptsAndStyles);
}
Anything you'd like to highlight/discuss:
Testing instructions:
Proposed commit message: (wrap lines at 72 characters)
Migrate layout to Typescript
Checklist: ☑️
Reviewer checklist:
Indicate the SEMVER impact of the PR:
At the end of the review, please label the PR with the appropriate label:
r.Major,r.Minor,r.Patch.Breaking change release note preparation (if applicable):