diff options
author | 2021-06-08 08:10:56 -0700 | |
---|---|---|
committer | 2021-06-08 11:10:56 -0400 | |
commit | 6bca7c83a7e2d62015f45f873b0f69f11b4d902b (patch) | |
tree | 5662630e51c6e6e743785d308785cff2e47568f0 /packages/create-astro/create-astro.mjs | |
parent | 9594447335b7fa15f82c0789f18a3fe02ec20d70 (diff) | |
download | astro-6bca7c83a7e2d62015f45f873b0f69f11b4d902b.tar.gz astro-6bca7c83a7e2d62015f45f873b0f69f11b4d902b.tar.zst astro-6bca7c83a7e2d62015f45f873b0f69f11b4d902b.zip |
redesign create-astro (#301)
* redesign create astro
* add changeset
* Use npm start
* Update the astro version
* Adds the changeset
Co-authored-by: Fred Schott <fks@Freds-MBP.attlocal.net>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Diffstat (limited to 'packages/create-astro/create-astro.mjs')
-rwxr-xr-x | packages/create-astro/create-astro.mjs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/create-astro/create-astro.mjs b/packages/create-astro/create-astro.mjs new file mode 100755 index 000000000..d29f568b2 --- /dev/null +++ b/packages/create-astro/create-astro.mjs @@ -0,0 +1,14 @@ +#!/usr/bin/env node +'use strict'; + +const currentVersion = process.versions.node; +const requiredMajorVersion = parseInt(currentVersion.split('.')[0], 10); +const minimumMajorVersion = 10; + +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()); |