This commit is contained in:
parent
20a1b919e2
commit
227af9d746
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@matthiesenxyz/create-astro-ghostcms",
|
"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",
|
"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",
|
||||||
|
|
|
@ -3,7 +3,6 @@ import os from "node:os";
|
||||||
import * as p from "@clack/prompts";
|
import * as p from "@clack/prompts";
|
||||||
import c from "picocolors";
|
import c from "picocolors";
|
||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from "node:url";
|
||||||
import readPkg from "read-pkg";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} url
|
* @param {string} url
|
||||||
|
@ -60,11 +59,3 @@ export function isPackageManager(str) {
|
||||||
/**
|
/**
|
||||||
* @typedef {import("../../types").PackageManager} PackageManager
|
* @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;
|
|
||||||
}
|
|
|
@ -1,11 +1,19 @@
|
||||||
import arg from "arg";
|
import arg from "arg";
|
||||||
import * as p from "@clack/prompts";
|
import * as p from "@clack/prompts";
|
||||||
import c from 'picocolors';
|
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 { createBasic } from "./runners/basic.js";
|
||||||
import { createStarterKit } from "./runners/starterkit.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() {
|
export async function main() {
|
||||||
const exit = () => process.exit(0);
|
const exit = () => process.exit(0);
|
||||||
|
|
Loading…
Reference in New Issue