Mmarklundin

playcanvas-esm-scripts

No description available

Legacy
playcanvasesmscriptsmigration
Public
2 downloads
0 stars
How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

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.

Ready to contribute?

Build your own codemod and share it with the community.