diff --git a/src/index.ts b/src/index.ts index ba4014e..d356cde 100644 --- a/src/index.ts +++ b/src/index.ts @@ -37,7 +37,8 @@ export const main = async (): Promise => { }, { choices: [ { name: 'Github', value: 'github' }, - { name: 'Private Repo', value: 'private-repo' } + { name: 'Private Repo', value: 'private-repo' }, + { name: 'Skip Git', value: 'skip-git' }, ], default: 0, name: 'gitLocation', @@ -67,7 +68,7 @@ export const main = async (): Promise => { type: 'input', name: 'repoPrivateLocation', message: 'Full URL of Git Repo:', - when: (answers) => answers.gitLocation !== 'github' + when: (answers) => answers.gitLocation !== 'github' && answers.gitLocation !== 'skip-git' }, { name: 'website', message: 'Homepage of Author:', @@ -154,18 +155,20 @@ export const main = async (): Promise => { } // GIT: Initial - await git.init(cwd, 'initial') - if (gitLocation === 'github' && typeof repoOwner !== 'undefined' && typeof repoName !== 'undefined') { - await git.addRemote(cwd, repoOwner, repoName) - } - - let gitUrl: string | undefined let gitIssues: string | undefined let gitReadme: string | undefined - if (gitLocation === 'github') { - gitUrl = `https://github.com/${repoOwner as string}/${repoName as string}` - gitIssues = `${gitUrl}/issues` - gitReadme = `${gitUrl}#readme` + let gitUrl: string | undefined + if (gitLocation !== 'skip-git') { + await git.init(cwd, 'initial') + if (gitLocation === 'github' && typeof repoOwner !== 'undefined' && typeof repoName !== 'undefined') { + await git.addRemote(cwd, repoOwner, repoName) + } + + if (gitLocation === 'github') { + gitUrl = `https://github.com/${repoOwner as string}/${repoName as string}` + gitIssues = `${gitUrl}/issues` + gitReadme = `${gitUrl}#readme` + } } // Generate Licence diff --git a/src/modules/constants.ts b/src/modules/constants.ts index 8d9fcd1..0990608 100644 --- a/src/modules/constants.ts +++ b/src/modules/constants.ts @@ -135,6 +135,8 @@ export const VITE_REACT_SWC: Dependencies = { '@types/react', '@types/react-dom', '@vitejs/plugin-react-swc', + 'eslint-plugin-react-hooks', + 'eslint-plugin-react-refresh', 'autoprefixer', 'prettier-plugin-tailwindcss', 'tailwindcss',