Hey guys,
How do i achieve the following when compiling with compass?
1. Have custom names for the final css files
2. Merge print.css and screen.css (the browser will always request print.css even if it's not used for printing, so having it separate just adds an extra request -> information taken from html5 boilerplate) into one file.
My guess is that it has something to do with callbacks so this is what i tried so far:
on_stylesheet_saved do |filename|
if File.exists?(filename)
dir = File.dirname(filename)
new_name = "#{dir}/styles.css"
`cp #{filename} #{new_name}`
end
end
The problem is that it produces the following error:
Errno::ENOENT on line ["31"] of D: No such file or directory - cp D:/_Wamp/www/Project/stylesheets/default/./ie.css D:/_Wamp/www/Project/stylesheets/default/./styles.css
It clearly has something to do with the slashes and working in Windows, because the following path is valid (the files exists): D:\_Wamp\www\Project\stylesheets\default\.\ie.css
I am not a Ruby programmer so any help would be appreciated (this is my first contact with it).