savory_theme 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,7 @@ module Savory::Theme
22
22
  end
23
23
 
24
24
  def clean
25
- File.unlink(bom_file_path)
25
+ File.unlink(bom_file_path) if File.exists?(bom_file_path)
26
26
  end
27
27
 
28
28
  class << self
@@ -19,6 +19,9 @@ module Savory::Theme
19
19
  raise "Failed: #{$!}"
20
20
  end
21
21
  end
22
+
23
+ def clean(theme)
24
+ end
22
25
  end
23
26
 
24
27
  add_feature(Compass)
@@ -1,3 +1,5 @@
1
+ require 'fileutils'
2
+
1
3
  module Savory::Theme
2
4
  class Packager
3
5
  class Features
@@ -19,6 +21,10 @@ module Savory::Theme
19
21
  raise "Failed: #{$!}"
20
22
  end
21
23
  end
24
+
25
+ def clean(theme)
26
+ FileUtils.rm_rf(".sass-cache", :secure => true, :verbose => @packager.verbose)
27
+ end
22
28
  end
23
29
 
24
30
  add_feature(Sass)
@@ -26,6 +26,16 @@ module Savory::Theme
26
26
  f.apply(theme)
27
27
  end
28
28
  end
29
+
30
+ def clean(theme)
31
+ applicable = @features.select do |f|
32
+ f.enabled?(theme)
33
+ end
34
+
35
+ applicable.each do |f|
36
+ f.clean(theme)
37
+ end
38
+ end
29
39
  end
30
40
  end
31
41
  end
@@ -47,6 +47,7 @@ module Savory::Theme
47
47
 
48
48
  def clean
49
49
  BOM.new(@theme).clean
50
+ @features.clean(@theme)
50
51
  @theme.layout.clean
51
52
  end
52
53
 
@@ -1,5 +1,5 @@
1
1
  module Savory
2
2
  module Theme
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: savory_theme
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.0
5
+ version: 1.0.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Andrea Campi