π§© VSCode Extension
This is a VSCode extension that consists of a set of commands to use with a T4 App (opens in a new tab) template instance.
π¦ Install
The T4 App Tools extension is available on the Visual Studio Code Marketplace (opens in a new tab).
π Usage
π± New Screen
Input the new screen name in CapitalizedCamelCase (i.e. the name that you would have used for the screen component). Subsequently this command will generate a new screen.tsx file under the directory packages/app/features/{ScreenName}, add a new index.tsx under apps/expo/app/{ScreenName}.tsx and add a new index.tsx under apps/next/pages/{ScreenName}.tsx importing your new screen in Nextjs. After that it will open the new screen.tsx file for you to modify.
π¨ New Component
Input the new component name in CapitalizedCamelCase. Subsequently this command will generate a new component under the packages/ui/src/components folder. After that it will open the new {ComponentName}.tsx file for you to modify.
β New API Route
Input the new API route name in lowercaseCamelCase. Subsequently this command will generate a new router in the packages/api/src/routes folder and add that to the index.ts router. After that it will open the new {routeName.ts} file for you to modify.
π¨ Building
To build the extension follow theses steps:
- Head over to
.vscode/settings.jsonand uncomment the first line:
"terminal.integrated.defaultProfile.windows": null,This will ensure that VSCode uses the correct terminal to run the build script.
- Execute the
Run T4 App Tools Extensionscript from theRun and Debugtab in VSCode.