This commit is contained in:
Adam Matthiesen 2024-01-28 01:01:12 -08:00
parent 20a1b919e2
commit 227af9d746
3 changed files with 11 additions and 12 deletions

View File

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

View File

@ -3,7 +3,6 @@ import os from "node:os";
import * as p from "@clack/prompts";
import c from "picocolors";
import { fileURLToPath } from "node:url";
import readPkg from "read-pkg";
/**
* @param {string} url
@ -60,11 +59,3 @@ export function isPackageManager(str) {
/**
* @typedef {import("../../types").PackageManager} PackageManager
*/
/**
* @return {Promise<string>} The current version of the package.
*/
export async function getVersion() {
const pkg = await readPkg()
return pkg.version;
}

View File

@ -1,11 +1,19 @@
import arg from "arg";
import * as p from "@clack/prompts";
import c from 'picocolors';
import { exitPrompt, isPackageManager, getVersion } from "./lib/utils.js";
import { exitPrompt, isPackageManager } from "./lib/utils.js";
import { createBasic } from "./runners/basic.js";
import { createStarterKit } from "./runners/starterkit.js";
import fse from "fs-extra";
const pkgVer = await getVersion()
async function pkgVer () {
try {
const packageObj = await fse.readJson('../package.json')
console.log(packageObj.version)
} catch (err) {
console.error(err)
}
}
export async function main() {
const exit = () => process.exit(0);