I wanted to use SASS on our company's web app but I can't install any programs on production machines. Everything I searched about SASS required you to run an installation program like gem and also required HAML.
I was hoping to find just a script that processes scss files without needing to install anything else.
No, Sass doesn't need to be installed on the server. It only needs to be installed locally, as the Sass is converted to CSS, and it's the CSS file (not the Sass file) that is uploaded to the live server. Web browsers don't actually know how to interpret Sass, so there is no need for the server to have it.
Well... if you have Ruby available, you could checkout the Git repository of Sass (https://github.com/nex3/sass). Do so by either typing git clone https://github.com/nex3/sass.git
or just downloading it.
Then you could use the interactive Ruby console by typing irb
. Try to require 'sass/lib/sass'
(this one here) and run Sass.compile_file 'my_styles.css'
.
Otherwise... why are you trying to do that? You can also install sass locally, run sass --watch
on your sass folder and it compiles your scss files automatically into css files - which you can deploy on your production environment.
If you can run java program in your build system, you could use JRuby for compiling sass. See this answer for more details
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With