timothymiller / t4-app

A powerful cross-platform UI toolkit for building actually native iOS, Android, macOS, Windows, Linux, and Progressive Web Apps with React (Native).
https://t4stack.com
MIT License
1.34k stars 71 forks source link

[Feature] T4 app tools #17

Closed albbus-stack closed 1 year ago

albbus-stack commented 1 year ago

I've implemented the previous vscode extension from CUA inside the project. Currently before running it you have to manually compile it with yarn compile in the apps/vscode folder. To run it simply use the vscode "Run and Debug" menu.

I've not added yarn compile as a required task before running because currently throws a bunch of errors regarding other packages (that I've already tried to exclude in the tsconfig). I would appreciate if you had a solution, here they are:

../../node_modules/react-native/types/modules/LaunchScreen.d.ts:17:16 - error TS2451: Cannot redeclare block-scoped variable 'ReloadInstructions'.

17   export const ReloadInstructions: any;
                  ~~~~~~~~~~~~~~~~~~

  ../../node_modules/@types/react-native/modules/LaunchScreen.d.ts:8:16
    8   export const ReloadInstructions: any;
                     ~~~~~~~~~~~~~~~~~~
    'ReloadInstructions' was also declared here.

Found 244 errors in 18 files.

Errors  Files
     4  node_modules/@types/node/globals.d.ts:47
     4  node_modules/@types/node/url.d.ts:826
     5  ../../node_modules/@types/react-native/index.d.ts:194
     3  ../../node_modules/@types/react-native/modules/BatchedBridge.d.ts:8
     1  ../../node_modules/@types/react-native/modules/Codegen.d.ts:1
     1  ../../node_modules/@types/react-native/modules/Devtools.d.ts:2
    15  ../../node_modules/@types/react-native/modules/globals.d.ts:10
     5  ../../node_modules/@types/react-native/modules/LaunchScreen.d.ts:4
   177  ../../node_modules/@types/react-native/node_modules/@types/react/ts5.0/index.d.ts:3168
     5  ../../node_modules/@types/react-native/public/DeprecatedPropertiesAlias.d.ts:20
     1  ../../node_modules/@types/react/ts5.0/global.d.ts:152
     1  ../../node_modules/@types/react/ts5.0/index.d.ts:3199
     5  ../../node_modules/react-native/types/index.d.ts:200
     3  ../../node_modules/react-native/types/modules/BatchedBridge.d.ts:17
     1  ../../node_modules/react-native/types/modules/Codegen.d.ts:10
     1  ../../node_modules/react-native/types/modules/Devtools.d.ts:11
     7  ../../node_modules/react-native/types/modules/globals.d.ts:19
     5  ../../node_modules/react-native/types/modules/LaunchScreen.d.ts:13

The extension then works fine in the dev environment.

albbus-stack commented 1 year ago

The issues are fixed!!

Now the only thing that you have to do to debug the vscode extension is uncommenting a line in .vscode/settings.json, only if you normally have a non default terminal profile. I will add some infos on the extension inside the docs tomorrow.

I've also fixed the github workflow and it should be good now.