How to minify?

Posted on
  • Hello,

    I'm trying to write a module and I want to make sure that it works properly after it is minified.

    Which minifier should I use and with what configuration/parameters to get the same results as in the official build system? I'm not using WebIDE.

  • I'd just use the 'Online Closure Compiler'. Wrap your code in (function() { .... })(), run it through with 'simple optimisations' and then strip that text out afterwards.

  • Hello,

    Has the WebIDE a build in minifier ?

    Thanks

    Sacha

  • Yes, if you click on the Options button and then minify (however this will obviously make it harder to debug your code).

    For modules, what I described above will mimic exactly what the Espruino website does with them.

  • Thanks.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

How to minify?

Posted by Avatar for graf @graf

Actions