mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-06-05 15:09:59 +09:00
Merge pull request #114 from lonekorean/node-engine-strict
Refactoring node engine version enforcement
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
const compareVersions = require('compare-versions');
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const process = require('process');
|
const process = require('process');
|
||||||
|
|
||||||
@@ -9,13 +8,6 @@ const parser = require('./src/parser');
|
|||||||
const writer = require('./src/writer');
|
const writer = require('./src/writer');
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
// Node version check
|
|
||||||
const requiredVersion = '12.14.0';
|
|
||||||
const currentVersion = process.versions.node;
|
|
||||||
if (compareVersions(currentVersion, requiredVersion) === -1) {
|
|
||||||
throw `This script requires Node v${requiredVersion} or higher, but you are using v${currentVersion}.`;
|
|
||||||
}
|
|
||||||
|
|
||||||
// parse any command line arguments and run wizard
|
// parse any command line arguments and run wizard
|
||||||
const config = await wizard.getConfig(process.argv);
|
const config = await wizard.getConfig(process.argv);
|
||||||
|
|
||||||
|
|||||||
Generated
-6
@@ -12,7 +12,6 @@
|
|||||||
"camelcase": "^6.0.0",
|
"camelcase": "^6.0.0",
|
||||||
"chalk": "^4.0.0",
|
"chalk": "^4.0.0",
|
||||||
"commander": "^5.0.0",
|
"commander": "^5.0.0",
|
||||||
"compare-versions": "^3.6.0",
|
|
||||||
"inquirer": "^7.1.0",
|
"inquirer": "^7.1.0",
|
||||||
"luxon": "^3.4.4",
|
"luxon": "^3.4.4",
|
||||||
"request": "^2.88.2",
|
"request": "^2.88.2",
|
||||||
@@ -451,11 +450,6 @@
|
|||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/compare-versions": {
|
|
||||||
"version": "3.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz",
|
|
||||||
"integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA=="
|
|
||||||
},
|
|
||||||
"node_modules/concat-map": {
|
"node_modules/concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
"camelcase": "^6.0.0",
|
"camelcase": "^6.0.0",
|
||||||
"chalk": "^4.0.0",
|
"chalk": "^4.0.0",
|
||||||
"commander": "^5.0.0",
|
"commander": "^5.0.0",
|
||||||
"compare-versions": "^3.6.0",
|
|
||||||
"inquirer": "^7.1.0",
|
"inquirer": "^7.1.0",
|
||||||
"luxon": "^3.4.4",
|
"luxon": "^3.4.4",
|
||||||
"request": "^2.88.2",
|
"request": "^2.88.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user