Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

MOD Question

February 01 (1 year ago)

Edited February 01 (1 year ago)

I'm building a mod using Typescript and compiling down to one single file, but i have to minify it otherwise the endfile will be full of junk from webpack, i already have the first version merged, but i wasnt using multiple files, but my mod is growing and I'm a Senior developer and tought that was going to be easier for me to keep separated files and etc. my question is, a minifyd script file is bad ? coz i saw the "best pratices" on github for roll20 mods and said to keep clean and readable, now i'm afraid of not getting it past coz of the minify. ( I'm new to moding of any form )


ps.: i kwno that mimified files are bad for debuggin

February 01 (1 year ago)
The Aaron
Roll20 Production Team
API Scripter

Interesting question.  I would suggest avoiding minified files for scripts submitted to the repo.  You don't need to submit scripts to the repot to use them, so in your own scripts, having minified content isn't going to be a problem.

Right now, API Scripts are a little simple in their integration.  Effectively, they all get concatenated into the same scope.  That means you can break your scripts across files/tabs and just look for them in either the global scope, or place all your scripts on a single scope object and look for them there.

February 02 (1 year ago)
yeah, make sense, i did move everything to one file, it is not optimal, but i get it :)