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

Remove unnecessary dependencies #171

Merged
merged 1 commit into from
Mar 9, 2021
Merged

Remove unnecessary dependencies #171

merged 1 commit into from
Mar 9, 2021

Conversation

val3344
Copy link
Contributor

@val3344 val3344 commented Mar 9, 2021

虽然 package.json 中仅定义了两个依赖,但最终会安装 290 个包。而实际上一个依赖
都不需要添加。

对于 hexo-fs,此项目使用到的几个 API,直接使用 Node.js 的 fs 模块就足够了。
hexo-fs 是添加了更多的文件 watch 等功能,此项目并没有用到。

对于 hexo-log,在 hexo 变量上,已经有初始化过的 log 可以直接用,没必自
己引入 hexo-log 再创建个实例。而且使用 hexo.log 还有个好处是 debug 和
slient 等配置,还会继承用户执行 hexo 命令时使用的 --debug--slient
等参数配置。

虽然 package.json 中仅定义了两个依赖,但最终会安装 290 个包。而实际上一个依赖
都不需要添加。

对于 hexo-fs,此项目使用到的几个 API,直接使用 Node.js 的 fs 模块就足够了。
hexo-fs 是添加了更多的文件 watch 等功能,此项目并没有用到。

对于 hexo-log,在 `hexo` 变量上,已经有初始化过的 `log` 可以直接用,没必自
己引入 hexo-log 再创建个实例。而且使用 `hexo.log` 还有个好处是 debug 和
slient 等配置,还会继承用户执行 `hexo` 命令时使用的 `--debug` 和 `--slient`
等参数配置。

Signed-off-by: val <[email protected]>
Copy link
Owner

@D0n9X1n D0n9X1n left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks.

@D0n9X1n D0n9X1n merged commit 935fe8f into D0n9X1n:master Mar 9, 2021
@val3344 val3344 deleted the fix-dependencies branch August 8, 2023 12:09
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.

2 participants