This commit is contained in:
Adam Matthiesen 2024-01-27 18:48:27 -08:00
parent 32ce5c42ad
commit b768695bfc
2 changed files with 5 additions and 3 deletions

View File

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

View File

@ -6,6 +6,8 @@ import * as p from "@clack/prompts";
import { exitPrompt, getModulePaths, isPathname,
normalizePath, wait } from "../lib/utils.js";
const runnerName = "basic";
/** @param {Context} ctx */
export async function createBasic(ctx) {
let { args, dryRun, initGitRepo, installDeps } = ctx;
@ -100,13 +102,13 @@ async function createApp(projectName, projectPathname, { onError }) {
const { pathname } = getModulePaths(import.meta.url);
const templatesDir = path.resolve(pathname, "..", "..", "templates");
const sharedTemplateDir = path.join(templatesDir, "_shared");
const basicTemplateDir = path.join(templatesDir, "basic");
const runnerTemplateDir = path.join(templatesDir, runnerName);
await fse.ensureDir(projectPathname);
// TODO: Detect if project directory is empty, otherwise we
// can't create a new project here.
await fse.copy(basicTemplateDir, projectPathname);
await fse.copy(runnerTemplateDir, projectPathname);
// Copy misc files from shared
const filesToCopy = [