Skip to content

qwreey/lune-minify-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lune-minify-js

Simple minify-js wrapper for lune runtime, with ffi edge feature.

Example usage

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

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

About

minify-js binding for lune runtime

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published