Refactor initSite method in Site/index.js #2267
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request?
Overview of changes:
Removes the "pass-through" method of
initSite
inSite/index.js
, and modifiescli/src/cmd/init.js
to directly call theinit
method fromSite/template.ts
.This was initially brought up by @tlylt in #2148 (comment here).
Anything you'd like to highlight/discuss:
The
initTemplate
function has been renamed toinit
, reason being that it was initially namedinitTemplate
to differentiate it from theinitSite
method. Since we are removinginitSite
in this PR, we can change it toinit
.Testing instructions:
Ensure that all
markbind init
methods still work.These were all tested and confirmed to work locally:
markbind init
markbind init --template default
markbind init --template minimal
markbind init --convert
Proposed commit message: (wrap lines at 72 characters)
Refactor initSite method in Site/index.js
Checklist: ☑️