shared-copy-typescript
v1.0.0-beta-6
Published
Node project which transforms TypeScript string definitions (static copy) into Kotlin code.
Downloads
4
Readme
Static Copy Artifact Generator - Spike 🧪
Node project which transforms TypeScript string definitions (static copy) into Kotlin code.
Generate static copy
Add new copy to the file definitions in typescript/resource/
. Files must end with .ts
in order for the file generation to work.
Generate Kotlin files
npm run build
Kotlin defintions are being generated in kotlin/resource
based on the folder structure of the typescript/resource
directory.
Naming convention
We recommend to create one file per page, i.e. welcome-page.ts
or checkpoint-page.ts
. Common journeys, i.e. pages within the finance journey should be listed in the journeys/finance
directory. Modals should be added in the modals
folder.
If kebab-case is used as the file/directory name, it will be transformed to camelCase for the Kotlin constants generation.
Example:
- dealBuilder
- welcome-page.ts
- checkout-page.ts
- journeys
- finance
- finance-start-page.ts
- finance-deposit-page.ts
- partEx
- modals
- learnMoreAboutPartExChangeModal.ts
- exploreYourPaymentOptions.ts
- leasing
- welcome-page.ts
...