Quantcast Show ESOUI: Add-on auto packer in the browser - ESOUI
Thread Tools Display Modes
02/17/19, 04:53 PM   #1
haggen
 
haggen's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2015
Posts: 137
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.

Last edited by haggen : 02/17/19 at 07:43 PM.
  Reply With Quote
02/17/19, 06:13 PM   #2
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 2,064
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.
  Reply With Quote
02/17/19, 08:58 PM   #3
Architecture
 
Architecture's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2016
Posts: 6
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)
  Reply With Quote
02/18/19, 05:42 AM   #4
haggen
 
haggen's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2015
Posts: 137
Originally Posted by Architecture View Post
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)
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.
  Reply With Quote
02/18/19, 06:04 AM   #5
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,203
Originally Posted by haggen View Post
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.
__________________
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
  Reply With Quote
02/18/19, 12:59 PM   #6
haggen
 
haggen's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2015
Posts: 137
Originally Posted by sirinsidiator View Post
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".
  Reply With Quote

ESOUI » Developer Discussions » Dev Tools » Show ESOUI: Add-on auto packer in the browser

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off