PhaserEditor2D-v3
PhaserEditor2D-v3 copied to clipboard
Set the style of generated code
It would be great if you could set the style of the generated code to match the user code.
For example, you could add an option in phasereditor2d.config.json
to decide whether to use single quotes (instead of double quotes) and whether to append a semicolon.
Yes, it would be great to have a way of setting up custom code formatting. I think we should define something like "compiler hooks". So, when the compiler generates a new file, it can trigger the hooks, especially, a formatter. I think the best way of doing this is using extensions.
Sounds good, would the extension then change the code style after it was generated or how would that work? And would that be a built-in extension?
Yes. The extension gets the generated source code and transforms it. It is like a pipe. At the end of the pipe, the code is written to the file. Also, the extension can get some parameters from the phasereditor2d.json.config
file.
+1🎉 Currently having Prettier ignore directories that contain auto-generated code.