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(hexo/index.js): Class syntax #3780

Merged
merged 3 commits into from
Oct 26, 2019
Merged

Conversation

curbengh
Copy link
Contributor

@curbengh curbengh commented Oct 20, 2019

What does it do?

Continuation of #3754. Inspired by hexojs/warehouse#52.

Using lebab as suggested by @deepnum mentioned in that PR, this PR simply lebab --transform class index.js -o class.js and then hoist the arrow functions to the top; I might miss something.

Other files in /lib/hexo can be refactored to this style as well, but since each file has >100 lines, I prefer to do each of them in a separate PR for easier review.

How to test

git clone -b refactor-class https://github.com/refactor-class/hexo.git
cd hexo
npm install
npm test

Tested on a test blog (both hexo g & s).

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.

@curbengh curbengh requested review from segayuu and a team October 20, 2019 07:59
lib/hexo/index.js Outdated Show resolved Hide resolved
@curbengh curbengh requested a review from SukkaW October 22, 2019 10:41
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 97.255% when pulling 4022108 on curbengh:refactor-class into 52adf39 on hexojs:master.

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.

3 participants