1

I'm playing with ruby and I noticed that the output wasn't minified when rendering my ruby script ... Files in my www folder are minified when displaying them... not my ruby script. It is the normal behavior ?

Actually it's not only ruby scripts but all scripts (C included)

There is something special to optimise it ? The g-wan script is launched with -d argument as root.

here a ruby sample :

puts "\n\nHello Ruby World\n\n!!"
exit 200

It will render file as it, without removing \n

solisoft
  • 669
  • 4
  • 12

1 Answers1

1

output isn't minified when rendering my Ruby / C scripts

When run in daemon mode, G-WAN does HTML / JS / CSS minification, and all are static contents.

When people write G-WAN scripts, they are building dynamic contents and in this case G-WAN does not attempt to interfere with the output.

This is why you do not see the Ruby script's ending CRLFs removed.

The minification feature is not activated when G-WAN is running interactively under a terminal to let developers work on their (normally formatted) source code.

Gil
  • 3,279
  • 1
  • 15
  • 25