smart_asset 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/smart_asset/version.rb +1 -1
- data/lib/smart_asset.rb +3 -2
- metadata +2 -2
data/lib/smart_asset/version.rb
CHANGED
data/lib/smart_asset.rb
CHANGED
@@ -32,6 +32,7 @@ class SmartAsset
|
|
32
32
|
ext = ext_from_type type
|
33
33
|
FileUtils.mkdir_p dest
|
34
34
|
(@config[type] || {}).each do |package, files|
|
35
|
+
next if ENV['PACKAGE'] && ENV['PACKAGE'] != package
|
35
36
|
if files
|
36
37
|
# Retrieve list of Git modified timestamps
|
37
38
|
modified = []
|
@@ -68,7 +69,7 @@ class SmartAsset
|
|
68
69
|
|
69
70
|
# Compress joined files
|
70
71
|
tmp = "#{dest}/tmp.#{ext}"
|
71
|
-
File.open(tmp, 'w') { |f| f.write(data.join) }
|
72
|
+
File.open(tmp, 'w') { |f| f.write(data.join("\n")) }
|
72
73
|
puts "\nCreating #{output}..."
|
73
74
|
if ext == 'js'
|
74
75
|
warning = ENV['WARN'] ? nil : " --warning_level QUIET"
|
@@ -78,7 +79,7 @@ class SmartAsset
|
|
78
79
|
end
|
79
80
|
puts cmd if ENV['DEBUG']
|
80
81
|
`#{cmd}`
|
81
|
-
FileUtils.rm
|
82
|
+
FileUtils.rm(tmp) unless ENV['DEBUG']
|
82
83
|
end
|
83
84
|
end
|
84
85
|
end
|