guard-sass 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +19 -0
- data/lib/guard/sass.rb +14 -1
- metadata +6 -6
data/README.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# Guard-Sass
|
2
2
|
|
3
|
+
## Install
|
4
|
+
|
5
|
+
You will need to have [guard](http://github.com/guard/guard) to contine, so install it now!.
|
6
|
+
|
7
|
+
Install the gem with:
|
8
|
+
|
9
|
+
gem install guard-sass
|
10
|
+
|
11
|
+
Add it to your Gemfile:
|
12
|
+
|
13
|
+
gem 'guard-sass'
|
14
|
+
|
15
|
+
And finally add a basic setup to your Guardfile with:
|
16
|
+
|
17
|
+
guard init sass
|
18
|
+
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
3
22
|
A guard extension that allows you to easily rebuild .sass (or .scss) files when changed.
|
4
23
|
|
5
24
|
guard 'sass' do
|
data/lib/guard/sass.rb
CHANGED
@@ -6,7 +6,7 @@ require 'sass'
|
|
6
6
|
module Guard
|
7
7
|
class Sass < Guard
|
8
8
|
|
9
|
-
VERSION = '0.0.
|
9
|
+
VERSION = '0.0.5'
|
10
10
|
attr_accessor :options
|
11
11
|
|
12
12
|
def initialize(watchers = [], options = {})
|
@@ -48,6 +48,19 @@ module Guard
|
|
48
48
|
# = Guard method =
|
49
49
|
# ================
|
50
50
|
|
51
|
+
# Build all files being watched
|
52
|
+
def run_all
|
53
|
+
patterns = @watchers.map {|w| w.pattern}
|
54
|
+
files = Dir.glob('**/*.*')
|
55
|
+
r = []
|
56
|
+
files.each do |file|
|
57
|
+
patterns.each do |pattern|
|
58
|
+
r << file if file.match(Regexp.new(pattern))
|
59
|
+
end
|
60
|
+
end
|
61
|
+
run_on_change(r)
|
62
|
+
end
|
63
|
+
|
51
64
|
# Build the files given
|
52
65
|
def run_on_change(paths)
|
53
66
|
paths.each do |file|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 5
|
9
|
+
version: 0.0.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Joshua Hawxwell
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-10-
|
17
|
+
date: 2010-10-26 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -22,13 +22,13 @@ dependencies:
|
|
22
22
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
23
|
none: false
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
segments:
|
28
28
|
- 0
|
29
|
+
- 2
|
29
30
|
- 1
|
30
|
-
|
31
|
-
version: 0.1.0
|
31
|
+
version: 0.2.1
|
32
32
|
type: :runtime
|
33
33
|
prerelease: false
|
34
34
|
version_requirements: *id001
|