Class: CssDir2
- Inherits:
-
Object
- Object
- CssDir2
- Defined in:
- lib/cssDir2.rb
Instance Method Summary collapse
-
#initialize(css_dir, css_dir2) ⇒ CssDir2
constructor
A new instance of CssDir2.
Constructor Details
#initialize(css_dir, css_dir2) ⇒ CssDir2
Returns a new instance of CssDir2.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/cssDir2.rb', line 6 def initialize(css_dir, css_dir2) puts "cssDir2 is now running...".green Compass.configuration.on_stylesheet_saved do |file| if File.exists?(file) directory = File.dirname(file) + "/" + css_dir2 + "/" if !File.exists?(directory) && !File.directory?(directory) Dir.mkdir(directory) puts "directory ".green + css_dir2 + "/" end basefile = File.basename(file) FileUtils.cp(file, directory + basefile) puts "copy ".blue + css_dir + "/" + basefile + " to " + css_dir2 + "/"+ basefile end end end |