test
This commit is contained in:
parent
32ce5c42ad
commit
b768695bfc
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@matthiesenxyz/create-astro-ghostcms",
|
"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",
|
"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",
|
||||||
|
|
|
@ -6,6 +6,8 @@ import * as p from "@clack/prompts";
|
||||||
import { exitPrompt, getModulePaths, isPathname,
|
import { exitPrompt, getModulePaths, isPathname,
|
||||||
normalizePath, wait } from "../lib/utils.js";
|
normalizePath, wait } from "../lib/utils.js";
|
||||||
|
|
||||||
|
const runnerName = "basic";
|
||||||
|
|
||||||
/** @param {Context} ctx */
|
/** @param {Context} ctx */
|
||||||
export async function createBasic(ctx) {
|
export async function createBasic(ctx) {
|
||||||
let { args, dryRun, initGitRepo, installDeps } = ctx;
|
let { args, dryRun, initGitRepo, installDeps } = ctx;
|
||||||
|
@ -100,13 +102,13 @@ async function createApp(projectName, projectPathname, { onError }) {
|
||||||
const { pathname } = getModulePaths(import.meta.url);
|
const { pathname } = getModulePaths(import.meta.url);
|
||||||
const templatesDir = path.resolve(pathname, "..", "..", "templates");
|
const templatesDir = path.resolve(pathname, "..", "..", "templates");
|
||||||
const sharedTemplateDir = path.join(templatesDir, "_shared");
|
const sharedTemplateDir = path.join(templatesDir, "_shared");
|
||||||
const basicTemplateDir = path.join(templatesDir, "basic");
|
const runnerTemplateDir = path.join(templatesDir, runnerName);
|
||||||
|
|
||||||
await fse.ensureDir(projectPathname);
|
await fse.ensureDir(projectPathname);
|
||||||
|
|
||||||
// TODO: Detect if project directory is empty, otherwise we
|
// TODO: Detect if project directory is empty, otherwise we
|
||||||
// can't create a new project here.
|
// can't create a new project here.
|
||||||
await fse.copy(basicTemplateDir, projectPathname);
|
await fse.copy(runnerTemplateDir, projectPathname);
|
||||||
|
|
||||||
// Copy misc files from shared
|
// Copy misc files from shared
|
||||||
const filesToCopy = [
|
const filesToCopy = [
|
||||||
|
|
Loading…
Reference in New Issue