ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Dev Tools (https://www.esoui.com/forums/forumdisplay.php?f=173)
-   -   Show ESOUI: Add-on auto packer in the browser (https://www.esoui.com/forums/showthread.php?t=8348)

haggen 02/17/19 04:53 PM

Show ESOUI: Add-on auto packer in the browser
 
So you just finished your add-on? That's great! Now to actually have it distributed you still have a small, and sometimes delicate, but nonetheless important procedure before you: to pack it. You know, create a nice ZIP package that's more easily handled, and can be uploaded to the site and downloaded by others. But you can't just ZIP the directory you were working on, since it may contain a .git directory, a .bat script, or even another ZIP you forgot in there. You have to clean it first. Then you have to make sure you zipped the folder and not just the files otherwise it won't play nice with Minion. Also what's the version you're packing again? Cause you know all the cool kids append it to the package file name, like AddOn-5.0.0.zip, so you gotta do it too. Soon you realize there's so much you feel like you need to write it down, make a checklist, or rather a script to automate the process.

Well allow me to make it easier on you: https://v8505xzqj3.codesandbox.io/ (temporary address)

TL;DR Click the file picker, select the add-on directory, make sure anything you don't want to include is listed on the text box, press Pack, and done! You now have a wonderful looking ZIP file to be downloaded at your most convenient time. Actually you'll want to do it now cause the link only works for that session.

Eventually I'll add extra features such as manifest validation and confirmation, i.e. you sure you want to publish version x.x.x, APIVersion is outdated, etc. even dependency resolution if I'm feeling crazy. Leave your feedback here and I'll see what I can do.

Baertram 02/17/19 06:13 PM

Many thanks! This is a nice and easy packer and saves a lot of time.

Feature ideas
## APIVersion validation would be cool! e.g. add a text box where we can put the APIversion and it will check if the txt file is up2date with it, or even change it to this APIversion inside the txt file (if possible).
Text filed should be using a validation method for an ESO API number then.

Checkbox/radiobutton to choose if ##Version oir ##AddOnVersion should be the suffix of the zip file. Good for libraries which do not need to use LibStub anymore (newly created) and simply use ##AddOnVersion

Same for ##AddOnVersion check against ##Version maybe? e.g. check if the ##Version tag contains a string one can change into a number and if so compare it with ##AddOnVersion (which needs to be an integer!). If they differ show a hint. If the ##Version cannot be converted into a number just ignore it.

Architecture 02/17/19 08:58 PM

Dependency resolution, please? Heh.

I personally have a little script I've used to do basic packaging, API uploading and semver minor / hotfix version increment (as well as ESO API / client version), allowing me to press a key combo in IDE to automatically publish current project (e.g. automatically updates my version number of addon, zips package, and uploads to ESOUI -- others have made similar I think), but never a website. I assume this is all processed on the server-side?

I will have to take a look and perhaps give it a try -- very neat! I feel like this sort of feature could be beneficial to all if built into ESOUI (i.e. similar to your website with directory upload, package, and validation / processing) :D

haggen 02/18/19 05:42 AM

Quote:

Originally Posted by Architecture (Post 37142)
Dependency resolution, please? Heh.

I personally have a little script I've used to do basic packaging, API uploading and semver minor / hotfix version increment (as well as ESO API / client version), allowing me to press a key combo in IDE to automatically publish current project (e.g. automatically updates my version number of addon, zips package, and uploads to ESOUI -- others have made similar I think), but never a website. I assume this is all processed on the server-side?

I will have to take a look and perhaps give it a try -- very neat! I feel like this sort of feature could be beneficial to all if built into ESOUI (i.e. similar to your website with directory upload, package, and validation / processing) :D

Oh automatic upload heh? That's interesting, could I have a look?

To be frank ESOUI is quite lacking in this department. Imagine a continuous deployment from Git to ESOUI with llinters, validations, and whatnot? Uhhh developer wet dreams!

By the way, it's all client-side. JSZip with the quite recent directory support for File API.

sirinsidiator 02/18/19 06:04 AM

Quote:

Originally Posted by haggen (Post 37147)
Oh automatic upload heh? That's interesting, could I have a look?

To be frank ESOUI is quite lacking in this department. Imagine a continuous deployment from Git to ESOUI with llinters, validations, and whatnot? Uhhh developer wet dreams!

ESOUI has a whole API for uploading. ;)

haggen 02/18/19 12:59 PM

Quote:

Originally Posted by sirinsidiator (Post 37149)
ESOUI has a whole API for uploading. ;)

I didn't know that actually. Cool!

Though come on, "whole API" was an euphemism. It's a single endpoint for update existing archives. Which is great! But far from "a whole API". :p


All times are GMT -6. The time now is 01:15 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI