-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add output configuration for studio codegen (#32)
- Loading branch information
1 parent
535540f
commit 8cb2de9
Showing
9 changed files
with
80 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from "./lib/amplify-ui-renderers/amplify-renderer"; | ||
export * from "./lib/amplify-ui-renderers/amplify-renderer"; | ||
export * from "./lib/index" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/studio-ui-codegen-react/lib/react-output-config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { FrameworkOutputConfig } from "@amzn/studio-ui-codegen"; | ||
|
||
export type ReactOutputConfig = FrameworkOutputConfig & { | ||
/** | ||
* @name outputFormat | ||
* @type string | ||
* @description required, the format of react ui codegen. | ||
* @values 'ts' | 'tsx' | 'js' | 'jsx' | ||
* @default jsx | ||
*/ | ||
outputFormat: JSOutputFormatEnum; | ||
// ES5,ES6 | ||
compileTarget: CompileTargetEnum; | ||
// CommonJS, ESModule | ||
module: JSModuleEnum | ||
} | ||
|
||
export enum JSOutputFormatEnum { | ||
ts = 'ts', | ||
tsx = 'tsx', | ||
js = 'js', | ||
jsx = 'jsx' | ||
} | ||
export enum CompileTargetEnum { | ||
ES5 = 'ES5', | ||
ES6 = 'ES6' | ||
} | ||
export enum JSModuleEnum { | ||
CommonJS = 'CommonJS', | ||
ESModule = 'ESModule' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
//The basic type for studio ui codegen output configuration | ||
export type FrameworkOutputConfig = { | ||
/** | ||
* @name outputPathDir | ||
* @type string | ||
* @description required, the directory of output path | ||
*/ | ||
outputPathDir: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters