前言
Hello,晚上好,正直九点时间。我还没吃饭呢,┭┮﹏┭┮。
这是我的我的插件本地测试经历吧。
具体教程网上很多。
dev test in local
hexo plugin
how to test your npm plugin package.
I use npm link
,and something must to be do with hexo plugin test.
This is step:
- In your npm package,use
npm link
to test in local. - And then, in your project,use
npm link [your packagen_ame]
to install it. - Ok,you can do test work.
- And last,you use
npm unlink [your package_name]
to uninstall it.
But why,I want to write this.
Because in hexo
module plugin,it needs more step to do it,if not it dosen’t work.
This is step:
- In your package to add packagename to
dependencies
. - And Ok,I tell you where to load module,the path is about
node_module/hexo/lib/hexo/load_plugins
.
---------------- The End and I hope sunshines on the outside. ----------------