hexo-cli
hexo-cli copied to clipboard
When we remove hexo in package.json,the generate(or any other command) action won't work
{
"name": "hexo-site",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "hexo generate",
"clean": "hexo clean",
"deploy": "hexo deploy",
"server": "hexo server"
},
// "hexo": {
// "version": "5.2.0"
// },
"dependencies": {
"hexo": "^5.0.0",
"hexo-generator-archive": "^1.0.0",
"hexo-generator-category": "^1.0.0",
"hexo-generator-index": "^2.0.0",
"hexo-generator-tag": "^1.0.0",
"hexo-renderer-ejs": "^1.0.0",
"hexo-renderer-marked": "^3.0.0",
"hexo-renderer-stylus": "^2.0.0",
"hexo-server": "^2.0.0"
}
}
I wonder how is this hexo
field being used internally? Why is it required? Thanks.
It is not, or maybe just to obtain the hexo version
It's here to ensure that we are in an hexo site folder, with all the expected folders available Theme, sources, config yml,
But indeed, we could test for the files that are required and not test for this field.
Am I wrong @hexojs/core ?
I think the hexo
field is required - at least when deploying to Vercel.
Vercel will fail the build if it is omitted, though I don't know what it is for exactly.