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
- Host: GitHub
- URL: https://github.com/qwreey/lune-minify-js
- Owner: qwreey
- License: mit
- Created: 2024-11-12T11:21:01.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-12T18:02:12.000Z (over 1 year ago)
- Last Synced: 2025-04-05T08:11:32.402Z (11 months ago)
- Topics: luau, lune, minify-javascript, web
- Language: Luau
- Homepage:
- Size: 18.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```