mrcoles / bookmarklet

A server-side bookmarklet compiler with greasemonkey userscript-like metadata options and the power of babel and uglify

Home Page:https://www.npmjs.com/package/bookmarklet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow to provide minifier (Terser) options

bootleq opened this issue · comments

Hi, I have some scripts use return on top level thus can't be converted.

Then I find we can tell Terser to enable bare_returns to accept it.
https://github.com/terser/terser#parse-options

Would it be good to add a CLI option like --minify to delegate to Terser?

I am willing to prepare a PR, maybe introduce yargs to help handling the options.