Permalink
Browse files

ignore css.map files [fix: #165]

  • Loading branch information...
1 parent dd931cf commit 37ce562a9fb2911396b846f8d354cf23647537ac @e2 e2 committed Aug 1, 2016
Showing with 7 additions and 1 deletion.
  1. +1 −1 lib/guard/livereload/templates/Guardfile
  2. +6 −0 spec/lib/guard/livereload/template_spec.rb
@@ -17,7 +17,7 @@ guard 'livereload' do
# file types LiveReload may optimize refresh for
compiled_exts = extensions.values.uniq
- watch(%r{public/.+\.(#{compiled_exts * '|'})})
+ watch(%r{public/.+\.(#{compiled_exts * '|'})\z})
extensions.each do |ext, type|
watch(%r{
@@ -22,6 +22,12 @@
expect(subject.changed('public/foo.jpg')).to eq(%w(public/foo.jpg))
expect(subject.changed('public/foo.jpeg')).to eq(%w(public/foo.jpeg))
end
+
+ context 'when extention does not match exactly' do
+ it 'does not reload' do
+ expect(subject.changed('public/main.css.map')).to eq([])
+ end
+ end
end
context 'with old Rails asset pipeline naming' do

0 comments on commit 37ce562

Please sign in to comment.