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

When we remove hexo in package.json,the generate(or any other command) action won't work #249

Open
sunbohong opened this issue Oct 4, 2020 · 3 comments

Comments

@sunbohong
Copy link

sunbohong commented Oct 4, 2020

{
  "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"
  }
}

image

@fnick851
Copy link

I wonder how is this hexo field being used internally? Why is it required? Thanks.

@tomap
Copy link
Contributor

tomap commented Feb 21, 2021

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 ?

@fnick851
Copy link

fnick851 commented Jun 16, 2021

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.

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

No branches or pull requests

3 participants