From 43d72e13d26b7f524444007d8771bd0046d11026 Mon Sep 17 00:00:00 2001 From: Zoey Kaiser Date: Fri, 29 Mar 2024 22:39:33 +0100 Subject: [PATCH] moved getResolver to ultis --- src/index.ts | 10 ++++++---- src/steps/2.addModules/index.ts | 2 +- src/steps/4.addCi.ts | 2 +- src/steps/6.addReadme.ts | 2 +- src/{ => utils}/getResolver.ts | 0 5 files changed, 9 insertions(+), 7 deletions(-) rename src/{ => utils}/getResolver.ts (100%) diff --git a/src/index.ts b/src/index.ts index c2f6a6f..7bf8938 100644 --- a/src/index.ts +++ b/src/index.ts @@ -43,22 +43,24 @@ const main = async () => { await wrapInSpinner("Adding Nuxt modules", addModules, preferences, template.dir) } - // 3. Initialize git + // 3. Add Linter + + // 4. Initialize git if (preferences.runGitInit) { await wrapInSpinner("Running `git init`", initGit, template.dir) } - // 4. Add CI + // 5. Add CI if (preferences.addCi === "github") { await wrapInSpinner("Adding CI template", addCi, preferences, template.dir) } - // 5. Run install + // 6. Run install if (preferences.runInstall) { await wrapInSpinner(`Running \`${getUserPkgManager()} install\``, npmInstall, template.dir) } - // 6. Write readme + // 7. Write readme await wrapInSpinner("Adding README", addReadme, preferences, template.dir) sayGoodbye(preferences) diff --git a/src/steps/2.addModules/index.ts b/src/steps/2.addModules/index.ts index a14aded..6947616 100644 --- a/src/steps/2.addModules/index.ts +++ b/src/steps/2.addModules/index.ts @@ -1,4 +1,4 @@ -import { getResolver } from "../../getResolver" +import { getResolver } from "../../utils/getResolver" import { Preferences } from "../../prompts" import { File, moduleConfigs, Modules } from "./moduleConfigs" import { addPackageDependencies, Dependency } from "../../utils/addPackageDependency" diff --git a/src/steps/4.addCi.ts b/src/steps/4.addCi.ts index a663d9c..8e5a3df 100644 --- a/src/steps/4.addCi.ts +++ b/src/steps/4.addCi.ts @@ -1,5 +1,5 @@ import { mkdir, writeFile } from "node:fs/promises" -import { getResolver } from "../getResolver" +import { getResolver } from "../utils/getResolver" import { Preferences } from "../prompts" const GITHUB_ACTIONS_TEMPLATE = ` diff --git a/src/steps/6.addReadme.ts b/src/steps/6.addReadme.ts index 44f4d64..56324c7 100644 --- a/src/steps/6.addReadme.ts +++ b/src/steps/6.addReadme.ts @@ -1,5 +1,5 @@ import { writeFile } from "node:fs/promises" -import { getResolver } from "../getResolver" +import { getResolver } from "../utils/getResolver" import { Preferences } from "../prompts" import { getUserPkgManager } from "../utils/getUserPkgManager" import { moduleConfigs, Modules } from "./2.addModules/moduleConfigs" diff --git a/src/getResolver.ts b/src/utils/getResolver.ts similarity index 100% rename from src/getResolver.ts rename to src/utils/getResolver.ts