Module minifier
Lua minifier - wrapper for LuaSrcDiet with simplified API.
Note: This module is not part of public API!
Functions
__call (opts, chunk, name) | Minifies the given Lua chunk . |
Functions
- __call (opts, chunk, name)
-
Minifies the given Lua
chunk
.Parameters:
- opts optional {[string]=bool,...} Table of options.
- chunk optional string Lua chunk (source code) to minify.
- name optional string The chunk name.
Returns:
-
function
A partially applied function accepting chunk and name. (if chunk is nil)
Or
-
string
Minified chunk. (if chunk is not nil)
Or
- nil (if chunk is not nil and minification failed)
- string An error message. (if chunk is not nil and minification failed)