[Lazarus] Fast-small utilities for common javascript tasks, anyone?

Michael Van Canneyt michael at freepascal.org
Sat Oct 8 10:18:28 CEST 2016



On Fri, 7 Oct 2016, Leonardo M. Ramé wrote:

>
> El 06/10/16 a las 18:01, Michael Van Canneyt escribió:
>> 
>> 
>> On Thu, 6 Oct 2016, Leonardo M. Ramé via Lazarus wrote:
>> 
>>> Hi, as some of you I mix Lazarus/FPC applications with Javascript/HTML/CSS 
>>> web sites. As you know, the trend now is using NodeJs for everything, but 
>>> as I see it too bloated I'm looking for small utilities to do the usual 
>>> tasks, I mean minifying, linting, uglifying.
>>> 
>>> I'm not neccesarily looking for programs developed using FPC, those can be 
>>> done in C (like jsmin from Douglas Crockford) or C++, or any other 
>>> compiled language without dependencies (please, not Java nor .Net).
>> 
>> I have translated jsmin to pascal and use that version. I can commit it to 
>> fcl-js.
>> 
>>> Why I ask this here?, well, first of all, because this is a very friendly 
>>> community, many of you think as I that software should be as least bloated 
>>> as possible, also because I asked this before on the javascript irc 
>>> channel and everyone uses NodeJs there, also I've got many -1s in 
>>> StackOverflow for asking for specific 3rd party utilities.
>> 
>> I use the lazarus IDE for writing js code. I made a IDE extension that lets 
>> you check the JS code using fcl-js.
>> Adding the jsmin tool should be easy.
>> 
>> Michael.
>
> Hi Michael, could you post jsmin.pas here?.

I added it to FPC SVN.  packages/fcl-js, unit jsminifier. I included an example program.

Improvements and suggestions welcome.

Michael.


More information about the Lazarus mailing list