Tuanjie can interpret individual typeScript source files as individual plug-ins.
Tuanjie supports TypeScript code written in source files with .tslib
extensions. To do this, Tuanjie interprets each source file as an individual plug-in and compiles them when it builds the Player. This type of plug-in is useful if you need to write a small amount of code for a single project.
To indicate to Tuanjie to create a plug-in from a TypeScript (.tslib
,.etslib
) source file:
.tslib
,.etslib
) source file.
Note: You can place the source files (.tslib
,.etslib
) in any folder in your Project, except in special use locations such as StreamingAssets. If you place files in these locations, the Tuanjie Editor doesn’t display the plug-in inspector.
By default when you export a Tuanjie project for OpenHarmony, Tuanjie only copies TypeScript files under directory Assets\Plugins\OpenHarmony
(includes .ts
, .ets
) over to the entry\src\main\ets
directory of DevEco Studio project. If you edit these files in DevEco Studio, the changes aren’t reflected in the original files in the Tuanjie project. If you export the Tuanjie project again, the export process will overwrite your changes in DevEco Studio.