File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ import { program } from "commander";
66program
77 . argument ( "<projectRoot>" , "path to the project's root directory" )
88 . option ( "--framework <framework>" )
9- . action ( async ( projectRoot , opts ) => {
10- await localBuild ( projectRoot , opts . framework ) ;
9+ . action ( async ( projectRoot , opts ) => {
10+ await localBuild ( projectRoot , opts . framework ) ;
1111 } ) ;
1212
1313program . parse ( ) ;
Original file line number Diff line number Diff line change 11import promiseSpawn from "@npmcli/promise-spawn" ;
2- import { readFileSync , existsSync } from "fs"
2+ import { readFileSync , existsSync } from "fs" ;
33import { join } from "path" ;
44import { yellow , bgRed , bold } from "colorette" ;
55import { OutputBundleConfig } from "@apphosting/common" ;
66import { SupportedFrameworks , Framework } from "@apphosting/common" ;
77import { parse as parseYaml } from "yaml" ;
88
9- export async function localBuild ( projectRoot : string , framework ?: string ) : Promise < OutputBundleConfig > {
9+ export async function localBuild (
10+ projectRoot : string ,
11+ framework ?: string ,
12+ ) : Promise < OutputBundleConfig > {
1013 if ( framework && SupportedFrameworks . includes ( framework as Framework ) ) {
1114 // TODO(#382): Skip this if there's a custom build command in apphosting.yaml.
1215 return await adapterBuild ( projectRoot , framework ) ;
1316 }
1417 throw new Error ( "framework not supported" ) ;
1518}
1619
17- export async function adapterBuild ( projectRoot : string , framework : string ) : Promise < OutputBundleConfig > {
20+ export async function adapterBuild (
21+ projectRoot : string ,
22+ framework : string ,
23+ ) : Promise < OutputBundleConfig > {
1824 // TODO(#382): support other apphosting.*.yaml files.
1925 // TODO(#382): parse apphosting.yaml for environment variables / secrets needed during build time.
2026
Original file line number Diff line number Diff line change @@ -4,8 +4,7 @@ import * as path from "node:path";
44
55// List of apphosting supported frameworks.
66export const SupportedFrameworks = [ "nextjs" , "angular" ] as const ;
7- export type Framework = typeof SupportedFrameworks [ number ] ;
8-
7+ export type Framework = ( typeof SupportedFrameworks ) [ number ] ;
98
109// **** OutputBundleConfig interfaces ****
1110
You can’t perform that action at this time.
0 commit comments