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

Refactor initSite method in Site/index.js #2267

Merged
merged 7 commits into from
Apr 10, 2023

Conversation

lhw-1
Copy link
Contributor

@lhw-1 lhw-1 commented Apr 6, 2023

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • DevOps
  • Improve developer experience
  • Others, please explain:

Overview of changes:

Removes the "pass-through" method of initSite in Site/index.js, and modifies cli/src/cmd/init.js to directly call the init method from Site/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 to init, reason being that it was initially named initTemplate to differentiate it from the initSite method. Since we are removing initSite in this PR, we can change it to init.

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: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

@lhw-1 lhw-1 mentioned this pull request Apr 6, 2023
15 tasks
@lhw-1 lhw-1 requested a review from a team April 7, 2023 06:30
Copy link
Contributor

@jovyntls jovyntls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@lhw-1 lhw-1 added this to the v5.0.0 milestone Apr 8, 2023
@lhw-1 lhw-1 requested a review from a team April 9, 2023 13:36
Copy link
Contributor

@itsyme itsyme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work @lhw-1! LGTM!

@lhw-1 lhw-1 merged commit 0012f63 into MarkBind:master Apr 10, 2023
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.

None yet

3 participants