Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-10

Fast-small utilities for common javascript tasks, anyone?

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Leonardo M. Ramé

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).

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.

Regards,

Reply by email

Michael Van Canneyt
to Leonardo M. Ramé
Leonardo M. Ramé wrote 8 lines
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.

Show quoted text 5 lines
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.

Reply by email

vfclists .
to Leonardo M. Ramé: Hi, as some of you I mix Lazarus/FPC applications with Javascript/HTML/CSS web sites. As…

On 6 October 2016 at 21:52, Leonardo M. Ramé via Lazarus <

Show quoted text 23 lines
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). 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. Regards, -- Leonardo M. Ramé http://leonardorame.blogspot.com

Stackoverflow nazis do get annoying. Try reddit. They are more friendly and newbie questions gets responses. No one is going to close or mark your question for deletion.

Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161007/8e34c5a4/attachment.html>

Reply by email

Leonardo M. Ramé
to Michael Van Canneyt: I have translated jsmin to pascal and use that version. I can commit it to fcl-js. I use…
Michael Van Canneyt wrote 29 lines
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?.

Regards,

Reply by email

Michael Van Canneyt
to Leonardo M. Ramé
Leonardo M. Ramé wrote 31 lines
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.

Reply by email

Leonardo M. Ramé
to Michael Van Canneyt
Michael Van Canneyt wrote 10 lines
> > 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.

Thanks Michael, that's great!.

BTW, I've found also a CSS Minifier, developed by Udo Schmal (http://www.gocher.me/CSSMin) I'll ask him if he allow us to add it to fcl-js.

Regards,

Leonardo M. Ramé Medical IT - Griensu S.A. Av. Colón 636 - Piso 8 Of. A X5000EPT -- Córdoba Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19 Cel.: +54 9 (011) 40871877

Reply by email

Michael Van Canneyt
to Leonardo M. Ramé
Leonardo M. Ramé wrote 17 lines
El 08/10/16 a las 05:18, Michael Van Canneyt via Lazarus escribió: > >> >> 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. Thanks Michael, that's great!. BTW, I've found also a CSS Minifier, developed by Udo Schmal (http://www.gocher.me/CSSMin) I'll ask him if he allow us to add it to fcl-js.

Great, that would come in handy as well !!

Michael.

Reply by email

Leonardo M. Ramé
to Michael Van Canneyt
Michael Van Canneyt wrote 22 lines
On Wed, 12 Oct 2016, Leonardo M. Ramé via Lazarus wrote: > El 08/10/16 a las 05:18, Michael Van Canneyt via Lazarus escribió: >> 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. > > Thanks Michael, that's great!. > > BTW, I've found also a CSS Minifier, developed by Udo Schmal > (http://www.gocher.me/CSSMin) I'll ask him if he allow us to add it > to fcl-js. Great, that would come in handy as well !! Michael.

Michael, I've got the answer from Udo Schmal, he gave permission to include the unit in fcl-js, here's his answer:

Hi Leonardo, I've updated the code so that it doesn't need the two additional

units as in

the old version. The code I published is based on some RegExp and is

therefore

slow. Unfortunately I did not have time to change the code similar to

the jsmin

Show quoted text 6 lines
function. But, feel free to share the code. Regards, Udo Schmal http://www.gocher.me

This is the link to the unit: http://www.gocher.me/code/css.pas

Reply by email