()
| 220 | } |
| 221 | |
| 222 | function checkNodeVersion(): void { |
| 223 | const [major, minor] = process.version.slice(1).split(".").map(Number); |
| 224 | const isValid = major > 12 || (major === 12 && minor >= 13); |
| 225 | if (!isValid) { |
| 226 | console.error(`TypeScriptToLua requires Node.js >=12.13.0, the current version is ${process.version}`); |
| 227 | process.exit(1); |
| 228 | } |
| 229 | } |
| 230 | |
| 231 | checkNodeVersion(); |
| 232 |