0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/packages/create-astro/create-astro.mjs

16 lines
495 B
JavaScript
Raw Normal View History

2021-09-06 03:25:23 -05:00
#!/usr/bin/env node
/* eslint-disable no-console */
2021-09-06 03:25:23 -05:00
'use strict';
const currentVersion = process.versions.node;
const requiredMajorVersion = parseInt(currentVersion.split('.')[0], 10);
const minimumMajorVersion = 18;
2021-09-06 03:25:23 -05:00
if (requiredMajorVersion < minimumMajorVersion) {
2021-12-22 16:11:05 -05:00
console.error(`Node.js v${currentVersion} is out of date and unsupported!`);
console.error(`Please use Node.js v${minimumMajorVersion} or higher.`);
process.exit(1);
2021-09-06 03:25:23 -05:00
}
import('./dist/index.js').then(({ main }) => main());