Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touching global variables and table indexing #49

Open
MarisKori opened this issue Aug 7, 2018 · 1 comment
Open

Touching global variables and table indexing #49

MarisKori opened this issue Aug 7, 2018 · 1 comment

Comments

@MarisKori
Copy link

MarisKori commented Aug 7, 2018

lua-minifier

It will be great if you add support of manual global variables and table indexing.
I mean additional optional list of names/indexes by user which will be replaced with a,b,c,d etc.

For example:
Code: arr={p=1,q=2} function f() x = arr.p end
List: p, q
Result: arr={a=1,b=2} function f() x = arr.a end

Example 2:
Code is the same.
List: arr, f, x
Result: a={p=1,q=2} function b() c = arr.p end

It is very useful when using deep structure of tables inside a script, i.e. you don't access those tables outside the script.

@mathiasbynens
Copy link
Owner

Could you please file this against the luamin repository? https://github.com/mathiasbynens/luamin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants