Skip to content

Commit

Permalink
update skeet create - rm -rf .github
Browse files Browse the repository at this point in the history
  • Loading branch information
POPPIN-FUMI committed Nov 6, 2023
1 parent cbff93f commit 8e265b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/cli/create/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ export const skeetCreate = async (appName: string, template: string) => {
await execSyncCmd(yarnApiCmd, appDir)
await execSyncCmd(
yarnApiCmd,
`${appDir}/${FUNCTIONS_PATH}/${DEFAULT_FUNCTION_NAME}`
`${appDir}/${FUNCTIONS_PATH}/${DEFAULT_FUNCTION_NAME}`,
)
if (template === SkeetTemplate.SolanaFirestore) {
await execSyncCmd(yarnApiCmd, `${appDir}/${WEB_APP_PATH}`)
}
const rmDefaultGit = ['rm', '-rf', '.git']
await execSyncCmd(rmDefaultGit, appDir)
const rmDefaultGithubActions = ['rm', '-rf', '.github']
await execSyncCmd(rmDefaultGithubActions, appDir)
await sleep(1000)
const yarnCmd = ['yarn']
await execSyncCmd(yarnCmd, `./${appName}`)
Expand Down Expand Up @@ -109,7 +111,7 @@ export const generateInitFiles = async (appName: string, template: string) => {
const eslintrcJson = await fileDataOf.eslintrcJson(appName, template)
writeFileSync(
eslintrcJson.filePath,
JSON.stringify(eslintrcJson.body, null, 2)
JSON.stringify(eslintrcJson.body, null, 2),
)

const eslintignore = await fileDataOf.eslintignore(appName, template)
Expand All @@ -129,7 +131,7 @@ export const generateInitFiles = async (appName: string, template: string) => {
writeFileSync(prettierrc.filePath, JSON.stringify(prettierrc.body, null, 2))
const skeetCloudConfigGen = await fileDataOf.skeetCloudConfigGen(
appName,
template
template,
)
writeFileSync(skeetCloudConfigGen.filePath, skeetCloudConfigGen.body)
const prettierignore = await fileDataOf.prettierignore(appName, template)
Expand Down Expand Up @@ -171,7 +173,7 @@ export const initAppJson = async (appName: string) => {

export const addAppNameToSkeetOptions = async (
appName: string,
functionName: string
functionName: string,
) => {
try {
const filePath = `./${appName}/functions/${functionName}/skeetOptions.json`
Expand Down
4 changes: 3 additions & 1 deletion src/cli/create/createBackend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import inquirer from 'inquirer'

export const createBackend = async (appName: string) => {
const { template } = await inquirer.prompt<{ template: string }>(
questionList.backendTemplateQuestions
questionList.backendTemplateQuestions,
)
const appDir = './' + appName
if (existsSync(appDir)) {
Expand All @@ -38,6 +38,8 @@ export const createBackend = async (appName: string) => {
await execSyncCmd(yarnApiCmd, backendRootPath)
const rmDefaultGit = ['rm', '-rf', '.git']
await execSyncCmd(rmDefaultGit, appDir)
const rmDefaultGithubActions = ['rm', '-rf', '.github']
await execSyncCmd(rmDefaultGithubActions, appDir)
await sleep(1000)

await generateInitFiles(appName, template)
Expand Down

0 comments on commit 8e265b5

Please sign in to comment.