Merge Branch create-util #19
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue