Skip to content

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 a team and segayuu October 20, 2019 07:59
@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