Updates legacy PlayCanvas scripts to the newer ESM Scripts format
This codemod transforms legacy PlayCanvas Scripts into their newer modern equivalents. You can open this codemod and run it over your existing scripts in vscode using the link to the side.
The codemod fully supports all syntax transformations apart from 'json' type attributes..
To run this codemod use
sh
This will translate the following older Script
javascript
transforms it into the modern ESM Scripts format
javascript
It will map any attribute properties to their relevant jsdocs tags according to the spec, and export all classes in the correct format. It will also handle enums correctly.