An open API service indexing awesome lists of open source software.

https://github.com/qwreey/lune-minify-js

minify-js binding for lune runtime
https://github.com/qwreey/lune-minify-js

luau lune minify-javascript web

Last synced: 11 months ago
JSON representation

minify-js binding for lune runtime

Awesome Lists containing this project

README

          

# lune-minify-js

Simple [minify-js](https://github.com/wilsonzlin/minify-js) wrapper for lune runtime, with ffi edge feature.

## Example usage

Run `cargo build --profile=release` first to get shared object.

```luau
local minify_js = require("./minify-js")
.new("./minify-js/target/release/liblune_minify_js.so")

-- Throw error if syntax error in code
local result = minify_js:minify([[
// Javascript code here
return function (numberA, numberB) {
return numberA + numberB
}
]], minify_js.TopLevelMode.Global)

print(result) -- return ((a,b)=>a+ b)

minify_js:drop() -- Drop library datas
```