Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update skeet create - rm -rf .github #179

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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