astro/packages/create-astro/create-astro.mjs
Fred K. Schott 4d6d8644e6
SImplify "astro add" by removing confusing multi-select (#3715)
* wip

* update create-astro for new astro add

* update copy

* update git prompt

* Update packages/astro/src/core/logger/node.ts

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* Update packages/create-astro/test/install-step.test.js

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* update git prompt

* update test

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2022-06-27 14:15:51 -07:00

14 lines
463 B
JavaScript
Executable file

#!/usr/bin/env node
'use strict';
const currentVersion = process.versions.node;
const requiredMajorVersion = parseInt(currentVersion.split('.')[0], 10);
const minimumMajorVersion = 14;
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());