Recent

Author Topic: Are there any SCSS and ES2015 transpilers, CSS and JS minifiers in pascal?  (Read 182 times)

grandehombre

  • New Member
  • *
  • Posts: 42
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
Lazarus v1.2RC2  i386-win32-win32/win64,  FPC v2.6.2, svn43696 on Win7-64 and win8.1

zamronypj

  • Full Member
  • ***
  • Posts: 104
    • Fano Framework, Free Pascal web application framework
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.
Fano Framework, Free Pascal web application framework https://fanoframework.github.io
Personal Projects https://v3.juhara.com
Github https://github.com/zamronypj

grandehombre

  • New Member
  • *
  • Posts: 42
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 :-(
Lazarus v1.2RC2  i386-win32-win32/win64,  FPC v2.6.2, svn43696 on Win7-64 and win8.1

 

TinyPortal © 2005-2018