Scss and Less Bash automation script

You are here

The use of Less and Scss is almost becoming mandatory. What I have been finding is that different projects want to use Less or Scss when doing web development, this is a real pain to constantly setup especially if you want to do a small update on one development. Below I have created two Bash scripts to automate the process.

To get them to work the packages needed on your Unix system are Ruby, the Scss and Less ruby gems, and Inotifywait for the automation of Less. Once they are installed then add css-compilers script to a directory of your choosing. Here is where it starts to get very easy, when you have a new project you copy the compiler-tool rename the file to the project name and open it and fill out the details. 

The advantages I have found are many but the top four are,

 

  • You fill the compiler-tool file once.
  • You don't have to remember paths or files names
  • Moving from development to development is very quick.
  • The system can be used in using Less or Scss 

 

To allow the script to work in your theme directory, you need two sub directories titled Scss and css. In each of those you will need a filename.scss and filename.css respectfully.

This has saved me so much time I hope it can help you in some way too.

AttachmentSize
1.1 KB