0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00
astro/packages/create-astro/create-astro.mjs

15 lines
466 B
JavaScript
Raw Normal View History

#!/usr/bin/env node
'use strict';
const currentVersion = process.versions.node;
const requiredMajorVersion = parseInt(currentVersion.split('.')[0], 10);
2021-06-14 07:20:14 -05:00
const minimumMajorVersion = 12;
if (requiredMajorVersion < minimumMajorVersion) {
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-07-19 23:07:49 -05:00
import('./dist/index.js').then(({ main }) => main());