Skip to content

Conversation

@1v9
Copy link
Member

@1v9 1v9 commented Jul 22, 2019

No description provided.

@1v9 1v9 added this to the v7.3.0 milestone Jul 22, 2019
@theme-next theme-next deleted a comment Jul 22, 2019
@theme-next theme-next deleted a comment Jul 22, 2019
@theme-next theme-next deleted a comment Jul 22, 2019
@theme-next theme-next deleted a comment Jul 22, 2019
@theme-next theme-next deleted a comment Jul 22, 2019
@theme-next theme-next deleted a comment Jul 22, 2019
@stevenjoezhang
Copy link
Contributor

In fact, there may be a lot of unnecessary files in source/lib, but they are hard to remove...

@1v9 1v9 changed the title Remove unnecessary js files after hexo generate Remove unnecessary files after hexo generate Jul 22, 2019
@jiangtj
Copy link
Member

jiangtj commented Jul 22, 2019

If cdn setted, may need remove...

@1v9
Copy link
Member Author

1v9 commented Jul 22, 2019

Only touch those files belong to NexT, not plugins installed to source/lib.

@1v9

This comment has been minimized.

@1v9
Copy link
Member Author

1v9 commented Jul 23, 2019

Sorry guys it's truly difficult for me 😂.

Hexo has config.ignore which could perfectly ignore directories, it's different from config.exclude and config.skip_render. You know we merge config on generateBefore and hexo also has built-in merge config functions so it may be complicated.

Then I tried to operate files by hexo-fs on a lot of filters or events, failed again. Only deployBefore is easy to configure but too restrictive. Need to find a good way to handle hexo g, hexo s, hexo d.

hexo.route used by this PR only supports string so I listed all files.

Both hexo.route and config.ignore solve the problem, but one is not very beautiful and the other is a bit complicated.

@jiangtj
Copy link
Member

jiangtj commented Jul 23, 2019

Both hexo.route and config.ignore solve the problem, but one is not very beautiful and the other is a bit complicated.

hexo.route is enough, it can remove the file with the specified path before the file is generated.

hexo.route used by this PR only supports string so I listed all files.

Path can not be a String?

Hexo has config.ignore which could perfectly ignore directorie

Are you sure that we can get the configuration of the theme before hexo calls config.ignore?

@1v9

This comment has been minimized.

@1v9

This comment has been minimized.

@theme-next theme-next deleted a comment Jul 24, 2019
@theme-next theme-next deleted a comment Jul 24, 2019
@theme-next theme-next deleted a comment Jul 24, 2019
@theme-next theme-next deleted a comment Jul 24, 2019
@theme-next theme-next deleted a comment Jul 24, 2019
@theme-next theme-next deleted a comment Jul 24, 2019
@theme-next theme-next deleted a comment Jul 24, 2019
@theme-next theme-next deleted a comment Jul 24, 2019
@theme-next theme-next deleted a comment Jul 24, 2019
@1v9
Copy link
Member Author

1v9 commented Jul 24, 2019

@stevenjoezhang @jiangtj Have a look?

@theme-next theme-next deleted a comment Jul 24, 2019
@theme-next theme-next deleted a comment Jul 24, 2019
@theme-next theme-next deleted a comment Jul 24, 2019
@theme-next theme-next deleted a comment Jul 25, 2019
@theme-next theme-next deleted a comment Jul 25, 2019
@1v9 1v9 requested review from jiangtj and stevenjoezhang July 25, 2019 01:31
@1v9 1v9 merged commit b021e3d into master Jul 25, 2019
@delete-merged-branch delete-merged-branch bot deleted the router branch July 25, 2019 06:18
tongluyang pushed a commit to tongluyang/hexo-theme-next that referenced this pull request Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants