This commit is contained in:
Adam Matthiesen 2024-01-28 00:48:20 -08:00
parent 49ac180b89
commit 20a1b919e2
3 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@matthiesenxyz/create-astro-ghostcms", "name": "@matthiesenxyz/create-astro-ghostcms",
"version": "0.0.1-dev34", "version": "0.0.1-dev35",
"description": "Utility to quickly get started with our Integration and astro", "description": "Utility to quickly get started with our Integration and astro",
"type": "module", "type": "module",
"main": "./create-astro-ghostcms.mjs", "main": "./create-astro-ghostcms.mjs",

View File

@ -62,8 +62,9 @@ export function isPackageManager(str) {
*/ */
/** /**
* @return {string} The current version of the package. * @return {Promise<string>} The current version of the package.
*/ */
export function getVersion() { export async function getVersion() {
return readPkg.sync().version; const pkg = await readPkg()
return pkg.version;
} }

View File

@ -5,7 +5,7 @@ import { exitPrompt, isPackageManager, getVersion } from "./lib/utils.js";
import { createBasic } from "./runners/basic.js"; import { createBasic } from "./runners/basic.js";
import { createStarterKit } from "./runners/starterkit.js"; import { createStarterKit } from "./runners/starterkit.js";
const pkgVer = getVersion() const pkgVer = await getVersion()
export async function main() { export async function main() {
const exit = () => process.exit(0); const exit = () => process.exit(0);