astro/packages/create-astro/create-astro.mjs
Nate Moore ed952b4cea
Improve create-astro startup performance (#8456)
* feat(create-astro): improve performance

* test: fix test by wrapping promise values

* chore: remove uneeded deps

* Update ten-kings-smash.md

* chore: update lockfile
2023-09-13 09:40:53 -05:00

15 lines
495 B
JavaScript
Executable file

#!/usr/bin/env node
/* eslint-disable no-console */
'use strict';
const currentVersion = process.versions.node;
const requiredMajorVersion = parseInt(currentVersion.split('.')[0], 10);
const minimumMajorVersion = 18;
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);
}
import('./dist/index.js').then(({ main }) => main());