Lazarus
Programming => Networking and Web Programming => Topic started by: grandehombre on October 27, 2020, 10:49:53 pm
-
Hi,
I am hoping to find ES2015 and SCSS transpilers, as well as JS and CSS minifiers that are written in freepascal.
The idea is to build a single, portable binary that will monitor directories and transform the files into minified CSS and JS, similar to what the combination of Gulp, babel and minify/uglify currently do in the node.js ecosystem.
That's what I currently use, however it is quite a mess with thousands of small text files that need to be present and the ever-present risk of something breaking if one of those files is updated (or removed as happened last year or so).
If I have to move to a new PC, all of that above has to be re-installed...
(Note: The above system works very well and I am grateful to the authors of the respective modules for making our lives easier)
Having written a few Lazarus/Freepascal apps, where everything is contained in one EXE, I'd very much like to do the same for my web app development.
Thanks in advance,
Nick
-
found none from what I know. Free Pascal has jsminifier.pp to minify JavaScript
https://github.com/graemeg/freepascal/blob/master/packages/fcl-js/src/jsminifier.pp
but output of minifier is not as compact as uglify-js.
If you need self-contained ES2015 and SCSS transpiler, you can create Free Pascal application and just include gulp, babel, scss tools in your executable installer binary, and call gulp, etc inside your executable.
-
Hi zamronypj,
I have found the following 2 minifiers
- https://www.gocher.me/JSMin
- https://www.gocher.me/CSSMin
Were it not for the fact that I need ES2015 transpilation, that would have been all that I needed.
The missing bit is something like Babel but in freepascal.
Trying to build a self-contained EXE with gulp and the relevant minifiers and transpilers would not work (as best as I can tell).
All of those need node.js and a myriad of dependencies to be installed on the PC :-(