In web projects on my local computer, I use a fairly simple Sass setup. In the same folder I have /scss/style.scss and / css / style.css
So, to start Sass while running, I just write this in Ruby Terminal:
cd "C:\Users\Puppybeard\Documents\Aptana Studio 3 Workspace\Project Title" sass --watch scss/style.scss:css/style.css
Works well, but it's a little cumbersome, so I'm trying to figure out how to make an equivalent with a script package. I tried the following, but it is a complete disaster, and my computer is trying to open an infinite number of Ruby consoles.
cd "C:\Ruby193\bin" start ruby cd "C:\Users\Puppybeard\Documents\Aptana Studio 3 Workspace\Project Title" sass --watch scss/style.scss:css/style.css exit
I think what I need to do is to run Ruby in the background, and not open Ruby exe. Does anyone know how, or is it even how Ruby works? Obviously I'm new to Sass, Ruby, and batch scripts, so any insights you can give me will be a big help, thanks.
EDIT: I got it like this
cd "\Ruby193\bin" sass --watch "C:\Users\Puppybeard\Documents\Aptana Studio 3 Workspace\Project Title\scss\style.scss:C:\Users\Puppybeard\Documents\Aptana Studio 3 Workspace\Project Title\css\style.css"
I think it should be neat and suspect that sass should have its $ PATH.
EDIT 2: I set the Path variable for Ruby using the following instructions: http://groups.google.com/group/beginning-rails/browse_thread/thread/1c68665013a60081
In my case, the path I needed to add was C: \ Ruby193 \ bin Now I need a single line when I have a script in the root of the web project:
sass --watch scss / style.scss: css / style.css
I could save the part where I changed the directory to the folder location if I wanted to have something that could be run from anywhere on my computer. However, the fact that the script does not indicate the location of the project means that I can simply copy it to any project where I use the same structure.
Is it worth the effort? Ultimately, perhaps yes.