Skip to content

Commit 1e5042c

Browse files
committed
feat: v1.12.9
1 parent 6bfc99d commit 1e5042c

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"scripts": {
55
"dev": "export NODE_OPTIONS=--openssl-legacy-provider && node --max_old_space_size=4096 ./node_modules/vuepress/cli.js dev docs",
66
"build": "export NODE_OPTIONS=--openssl-legacy-provider && node --max_old_space_size=4096 ./node_modules/vuepress/cli.js build docs",
7+
"predev": "vdoing",
8+
"prebuild": "vdoing",
79
"deploy": "bash deploy.sh",
810
"editFm": "node utils/editFrontmatter.js",
911
"baiduPush": "node utils/baiduPush.js https://xugaoyi.com && bash baiduPush.sh",
@@ -25,7 +27,7 @@
2527
"vuepress-plugin-sitemap": "^2.3.1",
2628
"vuepress-plugin-thirdparty-search": "^1.0.2",
2729
"vuepress-plugin-zooming": "^1.1.7",
28-
"vuepress-theme-vdoing": "^1.12.8",
30+
"vuepress-theme-vdoing": "^1.12.9",
2931
"yamljs": "^0.3.0"
3032
}
3133
}

vdoing/bin/checkVersion.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env node
2+
3+
const semver = require('semver');
4+
const chalk = require('chalk');
5+
const requiredVersion = require('../package.json').engines.node;
6+
7+
// check version
8+
if (!semver.satisfies(process.version, requiredVersion)) {
9+
console.log(chalk.red(
10+
`\n[vdoing] minimum Node version not met:`
11+
+ `\nYou are using Node ${process.version}, but vdoing `
12+
+ `requires Node ${requiredVersion}.\nPlease upgrade your Node version.\n`
13+
+ `请升级你的 Node 版本到 ${requiredVersion}.\n`
14+
))
15+
process.exit(1)
16+
}

vdoing/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuepress-theme-vdoing",
3-
"version": "1.12.8",
3+
"version": "1.12.9",
44
"description": "Vdoing theme for VuePress. 一个基于VuePress的知识管理兼博客主题。",
55
"author": {
66
"name": "gaoyi(Evan) Xu"
@@ -50,6 +50,9 @@
5050
"@vuepress/types": "^1.9.5"
5151
},
5252
"engines": {
53-
"node": ">=14.17.0"
53+
"node": ">=18.0.0"
54+
},
55+
"bin": {
56+
"vdoing": "./bin/checkVersion.js"
5457
}
5558
}

0 commit comments

Comments
 (0)