Skip to content

Commit

Permalink
Merge pull request #40 from elsoul/add/frontend
Browse files Browse the repository at this point in the history
add/frontend
  • Loading branch information
KishiTheMechanic authored Aug 14, 2023
2 parents 42c2905 + 70feb9f commit 0486b01
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@skeet-framework/cli",
"version": "1.1.2",
"version": "1.2.0",
"description": "Skeet CLI",
"main": "dist/index.js",
"repository": "https://github.com/elsoul/skeet-cli",
Expand Down
4 changes: 2 additions & 2 deletions src/cli/deploy/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { deployGraphql } from './deployGraphql'

export const deploy = async () => {
const functions = await getFunctions()
const functionsArray: Array<{ [key: string]: string }> = [{ name: 'webApp' }]
const functionsArray: Array<{ [key: string]: string }> = [{ name: 'webapp' }]
const { app } = await importConfig()
if (app.template.includes('GraphQL')) {
functionsArray.push({ name: 'graphql' })
Expand Down Expand Up @@ -36,7 +36,7 @@ export const deploy = async () => {
if (answers.functions) {
answers.functions.forEach(async (service) => {
const config = await importConfig()
if (service === 'webApp') {
if (service === 'webapp') {
await deployWebApp()
await deployRules(config.app.projectId)
} else if (service === 'graphql') {
Expand Down
14 changes: 12 additions & 2 deletions src/cli/yarn/yarn.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import inquirer from 'inquirer'
import { execSyncCmd, getFunctions, FUNCTIONS_PATH } from '@/lib'
import { execSyncCmd, getFunctions, FUNCTIONS_PATH, WEB_APP_PATH } from '@/lib'
import { GRAPHQL_ROOT } from '@/index'

export type YarnService = {
Expand All @@ -12,7 +12,11 @@ export const yarn = async (
isDev: boolean = false
) => {
const functions = await getFunctions()
const functionsArray: Array<{ [key: string]: string }> = [{ name: 'graphql' }]
const functionsArray: Array<{ [key: string]: string }> = [
{ name: 'graphql' },
{ name: 'webapp' },
{ name: 'root' },
]
for await (const functionName of functions) {
functionsArray.push({ name: functionName })
}
Expand Down Expand Up @@ -76,6 +80,12 @@ const getYarnShCmd = async (
case 'graphql':
shCmd = ['yarn', '--cwd', `${GRAPHQL_ROOT}`, cmd]
break
case 'webapp':
shCmd = ['yarn', '--cwd', `${WEB_APP_PATH}`, cmd]
break
case 'root':
shCmd = ['yarn', cmd]
break
default:
shCmd = ['yarn', '--cwd', `${FUNCTIONS_PATH}/${functionName}`, cmd]
break
Expand Down

0 comments on commit 0486b01

Please sign in to comment.