From ca14d8814020f76373428c55aae11de1686c8eb9 Mon Sep 17 00:00:00 2001 From: BlackBerry009 <765042894@qq.com> Date: Sun, 19 Mar 2023 17:05:47 +0800 Subject: [PATCH] change dir change dir --- package.json | 7 ++++++- src/init.ts | 12 +++++------- {template-react-ts => templates/react-ts}/.gitignore | 0 {template-react-ts => templates/react-ts}/index.html | 0 .../react-ts}/package.json | 0 .../react-ts}/pnpm-lock.yaml | 0 .../react-ts}/public/vite.svg | 0 .../react-ts}/src/App.tsx | 0 .../react-ts}/src/assets/logo.svg | 0 .../src/components/Layout/SideMenu/index.tsx | 0 .../react-ts}/src/components/Layout/index.scss | 0 .../react-ts}/src/components/Layout/index.tsx | 0 .../react-ts}/src/index.scss | 0 .../react-ts}/src/main.tsx | 0 .../react-ts}/src/pages/Home/index.tsx | 0 .../react-ts}/src/pages/Show/index.tsx | 0 .../react-ts}/src/route.tsx | 0 .../react-ts}/src/vite-env.d.ts | 0 .../react-ts}/tsconfig.json | 0 .../react-ts}/tsconfig.node.json | 0 .../react-ts}/vite.config.ts | 0 21 files changed, 11 insertions(+), 8 deletions(-) rename {template-react-ts => templates/react-ts}/.gitignore (100%) rename {template-react-ts => templates/react-ts}/index.html (100%) rename {template-react-ts => templates/react-ts}/package.json (100%) rename {template-react-ts => templates/react-ts}/pnpm-lock.yaml (100%) rename {template-react-ts => templates/react-ts}/public/vite.svg (100%) rename {template-react-ts => templates/react-ts}/src/App.tsx (100%) rename {template-react-ts => templates/react-ts}/src/assets/logo.svg (100%) rename {template-react-ts => templates/react-ts}/src/components/Layout/SideMenu/index.tsx (100%) rename {template-react-ts => templates/react-ts}/src/components/Layout/index.scss (100%) rename {template-react-ts => templates/react-ts}/src/components/Layout/index.tsx (100%) rename {template-react-ts => templates/react-ts}/src/index.scss (100%) rename {template-react-ts => templates/react-ts}/src/main.tsx (100%) rename {template-react-ts => templates/react-ts}/src/pages/Home/index.tsx (100%) rename {template-react-ts => templates/react-ts}/src/pages/Show/index.tsx (100%) rename {template-react-ts => templates/react-ts}/src/route.tsx (100%) rename {template-react-ts => templates/react-ts}/src/vite-env.d.ts (100%) rename {template-react-ts => templates/react-ts}/tsconfig.json (100%) rename {template-react-ts => templates/react-ts}/tsconfig.node.json (100%) rename {template-react-ts => templates/react-ts}/vite.config.ts (100%) diff --git a/package.json b/package.json index a68f688..f4779b0 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,14 @@ "bin": { "taco": "index.js" }, + "keywords": [ + "cli", + "template", + "boilerplate" + ], "files": [ "index.js", - "template-*", + "template", "dist" ], "scripts": { diff --git a/src/init.ts b/src/init.ts index 2007c44..a68065e 100644 --- a/src/init.ts +++ b/src/init.ts @@ -8,8 +8,8 @@ import { fileURLToPath } from 'node:url'; const getDirName = (filename: string) => { const templateDir = path.resolve( fileURLToPath(import.meta.url), - '../..', - `template-${filename}`, + '../../templates', + `${filename}`, ); return templateDir; }; @@ -60,16 +60,14 @@ export const main = async () => { } s.stop(`Creating project success!`); let nextSteps = `cd ${project.name} \n - pnpm install \n - pnpm start`; + pnpm install \n + pnpm start`; p.note(nextSteps, 'Next steps.'); p.outro( `Problems? ${color.underline( - color.cyan( - 'https://github.com/BlackBerry009/create-boilerplate-cli/issues', - ), + color.cyan('https://github.com/BlackBerry009/taco-launch'), )}`, ); }, diff --git a/template-react-ts/.gitignore b/templates/react-ts/.gitignore similarity index 100% rename from template-react-ts/.gitignore rename to templates/react-ts/.gitignore diff --git a/template-react-ts/index.html b/templates/react-ts/index.html similarity index 100% rename from template-react-ts/index.html rename to templates/react-ts/index.html diff --git a/template-react-ts/package.json b/templates/react-ts/package.json similarity index 100% rename from template-react-ts/package.json rename to templates/react-ts/package.json diff --git a/template-react-ts/pnpm-lock.yaml b/templates/react-ts/pnpm-lock.yaml similarity index 100% rename from template-react-ts/pnpm-lock.yaml rename to templates/react-ts/pnpm-lock.yaml diff --git a/template-react-ts/public/vite.svg b/templates/react-ts/public/vite.svg similarity index 100% rename from template-react-ts/public/vite.svg rename to templates/react-ts/public/vite.svg diff --git a/template-react-ts/src/App.tsx b/templates/react-ts/src/App.tsx similarity index 100% rename from template-react-ts/src/App.tsx rename to templates/react-ts/src/App.tsx diff --git a/template-react-ts/src/assets/logo.svg b/templates/react-ts/src/assets/logo.svg similarity index 100% rename from template-react-ts/src/assets/logo.svg rename to templates/react-ts/src/assets/logo.svg diff --git a/template-react-ts/src/components/Layout/SideMenu/index.tsx b/templates/react-ts/src/components/Layout/SideMenu/index.tsx similarity index 100% rename from template-react-ts/src/components/Layout/SideMenu/index.tsx rename to templates/react-ts/src/components/Layout/SideMenu/index.tsx diff --git a/template-react-ts/src/components/Layout/index.scss b/templates/react-ts/src/components/Layout/index.scss similarity index 100% rename from template-react-ts/src/components/Layout/index.scss rename to templates/react-ts/src/components/Layout/index.scss diff --git a/template-react-ts/src/components/Layout/index.tsx b/templates/react-ts/src/components/Layout/index.tsx similarity index 100% rename from template-react-ts/src/components/Layout/index.tsx rename to templates/react-ts/src/components/Layout/index.tsx diff --git a/template-react-ts/src/index.scss b/templates/react-ts/src/index.scss similarity index 100% rename from template-react-ts/src/index.scss rename to templates/react-ts/src/index.scss diff --git a/template-react-ts/src/main.tsx b/templates/react-ts/src/main.tsx similarity index 100% rename from template-react-ts/src/main.tsx rename to templates/react-ts/src/main.tsx diff --git a/template-react-ts/src/pages/Home/index.tsx b/templates/react-ts/src/pages/Home/index.tsx similarity index 100% rename from template-react-ts/src/pages/Home/index.tsx rename to templates/react-ts/src/pages/Home/index.tsx diff --git a/template-react-ts/src/pages/Show/index.tsx b/templates/react-ts/src/pages/Show/index.tsx similarity index 100% rename from template-react-ts/src/pages/Show/index.tsx rename to templates/react-ts/src/pages/Show/index.tsx diff --git a/template-react-ts/src/route.tsx b/templates/react-ts/src/route.tsx similarity index 100% rename from template-react-ts/src/route.tsx rename to templates/react-ts/src/route.tsx diff --git a/template-react-ts/src/vite-env.d.ts b/templates/react-ts/src/vite-env.d.ts similarity index 100% rename from template-react-ts/src/vite-env.d.ts rename to templates/react-ts/src/vite-env.d.ts diff --git a/template-react-ts/tsconfig.json b/templates/react-ts/tsconfig.json similarity index 100% rename from template-react-ts/tsconfig.json rename to templates/react-ts/tsconfig.json diff --git a/template-react-ts/tsconfig.node.json b/templates/react-ts/tsconfig.node.json similarity index 100% rename from template-react-ts/tsconfig.node.json rename to templates/react-ts/tsconfig.node.json diff --git a/template-react-ts/vite.config.ts b/templates/react-ts/vite.config.ts similarity index 100% rename from template-react-ts/vite.config.ts rename to templates/react-ts/vite.config.ts