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

bump Node.js version of netlify #2240

Merged
merged 4 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
console.warn('Skip Husky install in production and CI.')
process.exit(0)
}
const husky = (await import('husky')).default
console.log(husky())
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build]
command = "npm run build"
publish = "/public"
environment = { NODE_VERSION = "14", NODE_ENV = "production" }
environment = { NODE_VERSION = "lts/*", NODE_ENV = "production" }

[[redirects]]
from = "/"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "hexo generate",
"eslint": "eslint .",
"format:md": "prettier --write */**/docs/*.md */**/api/*.md",
"prepare": "husky"
"prepare": "node .husky/install.mjs"
},
"dependencies": {
"cheerio": "^0.22.0",
Expand Down Expand Up @@ -46,4 +46,4 @@
"engines": {
"node": ">=14"
}
}
}