Minify on wsc files

If minify is runny on wsc files, would you expect a problem. 

My process is to change the extension to js and then run minify and change it back. Is there any reason why you would not expect that to work.

Could you please suggest a better method, in vs code. any assistance would help thanks.

1 Comment

Unfortunately I don't think that's going to work, because wsc files are json files rather than js files, i.e. they contain data and not code, strictly speaking. They may contain code that's inserted in the json as text strings. So a minifier will not throw any errors but it will not change your code in the wsc file either.

I agree that this should be something that the Wade editor does for you, ideally when you download your project we could add an option to download a minified version of it.

In the meantime, your best bet is to move the bulk of your code to js files, and keep the code in the wsc to a minimum (for example by doing most of the game logic using behaviors).

Post a reply
Add Attachment
Submit Reply
Login to Reply