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

fix(box): ignore node_modules/ & .git/ in themes #3918

Merged
merged 3 commits into from
Dec 12, 2019

Conversation

curbengh
Copy link
Contributor

@curbengh curbengh commented Dec 9, 2019

What does it do?

Continuation of #3797

Supersedes and closes hexojs/hexo-starter#30 cc @dailyrandomphoto

Related: #3885 hexojs/hexo-server#45 hexojs/hexo-server#43

How to test

cc @shen-yu

package.json
-  "hexo": "^4.1.0",
+  "hexo": "curbengh/hexo#ignore-theme-node",
  1. rm -f package-lock.json && rm -rf node_modules/
  2. npm install
  3. hexo clean && hexo server

Maintainers only:

git clone -b ignore-theme-node https://github.com/curbengh/hexo.git
cd hexo
npm install
npm test

Pull request tasks

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

@curbengh curbengh changed the title fix(box): always ignore node_modules folder of themes fix(box): always ignore node_modules/ in themes Dec 9, 2019
@coveralls
Copy link

coveralls commented Dec 9, 2019

Coverage Status

Coverage increased (+0.006%) to 97.137% when pulling a5c42d0 on curbengh:ignore-theme-node into c19096b on hexojs:master.

@curbengh
Copy link
Contributor Author

curbengh commented Dec 9, 2019

As I couldn't reproduce the original issue, I will mark this ready for review after affected users have confirmed this PR does fix the issue.

@dailyrandomphoto
Copy link
Member

As I couldn't reproduce the original issue, I will mark this ready for review after affected users have confirmed this PR does fix the issue.

It works for me.

@curbengh curbengh marked this pull request as ready for review December 10, 2019 12:11
@curbengh curbengh changed the title fix(box): always ignore node_modules/ in themes fix(box): ignore node_modules/ & .git/ in themes Dec 10, 2019
@curbengh curbengh requested a review from seaoak December 10, 2019 12:12
@curbengh curbengh added this to the 4.2.1 milestone Dec 10, 2019
SukkaW
SukkaW previously approved these changes Dec 11, 2019
lib/box/index.js Outdated Show resolved Hide resolved
lib/hexo/default_config.js Outdated Show resolved Hide resolved
@curbengh
Copy link
Contributor Author

The benchmark finished a lot quicker than usual.

Iterating through merged PRs, it starts from #3926.

We need to test the master branch in a test blog.

@SukkaW
Copy link
Member

SukkaW commented Dec 11, 2019

@curbengh I am already working on it.


TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Hexo.postPermalinkFilter (/mnt/d/Project/Sukka/hexo-theme-unit-test/node_modules/hexo/lib/plugins/filter/post_permalink.js:46:24)
    at Filter.execSync (/mnt/d/Project/Sukka/hexo-theme-unit-test/node_modules/hexo/lib/extend/filter.js:75:28)

@curbengh
Copy link
Contributor Author

It's from #3926, need null-check on config.permalink_defaults.

@curbengh
Copy link
Contributor Author

Since you're working on it, feel free to submit fix.

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.

4 participants