guard-sass 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -5
- data/lib/guard/sass/formatter.rb +4 -9
- data/lib/guard/sass/runner.rb +3 -6
- data/lib/guard/sass/version.rb +1 -1
- data/lib/guard/sass.rb +0 -3
- metadata +10 -10
data/README.md
CHANGED
@@ -77,9 +77,6 @@ The following options can be passed to guard-sass:
|
|
77
77
|
:output => 'css' # Relative path to the output directory.
|
78
78
|
# default: 'css' or the :input option when supplied
|
79
79
|
|
80
|
-
:notification => false # Whether to display success and error notifications.
|
81
|
-
# default: true
|
82
|
-
|
83
80
|
:hide_success => true # Disable successful compilation messages.
|
84
81
|
# default: false
|
85
82
|
|
@@ -96,12 +93,12 @@ The following options can be passed to guard-sass:
|
|
96
93
|
:noop => true # No operation: Do not write output file
|
97
94
|
# default: false
|
98
95
|
|
99
|
-
:
|
96
|
+
:debug_info => true # File and line number info for FireSass.
|
100
97
|
# default: false
|
101
98
|
|
102
99
|
### Output short notation
|
103
100
|
|
104
|
-
guard-sass also has a short notation like [guard-coffeescript][gcs], this lets
|
101
|
+
guard-sass also has a short notation like [guard-coffeescript][gcs], this lets
|
105
102
|
you define an input folder (with an optional output folder) automatically creating
|
106
103
|
the required watcher.
|
107
104
|
|
data/lib/guard/sass/formatter.rb
CHANGED
@@ -5,13 +5,10 @@ module Guard
|
|
5
5
|
class Formatter
|
6
6
|
|
7
7
|
# @param opts [Hash]
|
8
|
-
# @option opts [Boolean] :notification
|
9
|
-
# Whether to show notifications
|
10
8
|
# @option otps [Boolean] :success
|
11
9
|
# Whether to print success messages
|
12
10
|
def initialize(opts={})
|
13
|
-
@
|
14
|
-
@success = opts.fetch(:show_success, true)
|
11
|
+
@hide_success = opts.fetch(:hide_success, false)
|
15
12
|
end
|
16
13
|
|
17
14
|
# Show a success message and notification if successes are being shown.
|
@@ -19,7 +16,7 @@ module Guard
|
|
19
16
|
# @param msg [String]
|
20
17
|
# @param opts [Hash]
|
21
18
|
def success(msg, opts={})
|
22
|
-
|
19
|
+
unless @hide_success
|
23
20
|
::Guard::UI.info(msg, opts)
|
24
21
|
notify(opts[:notification], :image => :success)
|
25
22
|
end
|
@@ -34,14 +31,12 @@ module Guard
|
|
34
31
|
notify(opts[:notification], :image => :failed)
|
35
32
|
end
|
36
33
|
|
37
|
-
# Show a system notification
|
34
|
+
# Show a system notification.
|
38
35
|
#
|
39
36
|
# @param msg [String]
|
40
37
|
# @param opts [Hash] See http://rubydoc.info/github/guard/guard/master/Guard/Notifier.notify
|
41
38
|
def notify(msg, opts={})
|
42
|
-
|
43
|
-
::Guard::Notifier.notify(msg, ({:title => "Guard::Sass"}).merge(opts))
|
44
|
-
end
|
39
|
+
::Guard::Notifier.notify(msg, ({:title => "Guard::Sass"}).merge(opts))
|
45
40
|
end
|
46
41
|
|
47
42
|
end
|
data/lib/guard/sass/runner.rb
CHANGED
@@ -10,12 +10,9 @@ module Guard
|
|
10
10
|
# @param watchers [Array<Guard::Watcher>]
|
11
11
|
# @param options [Hash] See Guard::Sass::DEFAULTS for available options
|
12
12
|
def initialize(watchers, options={})
|
13
|
-
@watchers
|
14
|
-
@options
|
15
|
-
@formatter = Formatter.new(
|
16
|
-
:notification => options[:notification],
|
17
|
-
:show_success => !options[:hide_success]
|
18
|
-
)
|
13
|
+
@watchers = watchers
|
14
|
+
@options = options
|
15
|
+
@formatter = Formatter.new(:hide_success => options[:hide_success])
|
19
16
|
end
|
20
17
|
|
21
18
|
# @param files [Array<String>]
|
data/lib/guard/sass/version.rb
CHANGED
data/lib/guard/sass.rb
CHANGED
@@ -11,7 +11,6 @@ module Guard
|
|
11
11
|
DEFAULTS = {
|
12
12
|
:output => 'css',
|
13
13
|
:style => :nested,
|
14
|
-
:notification => true,
|
15
14
|
:shallow => false,
|
16
15
|
:debug_info => false,
|
17
16
|
:noop => false,
|
@@ -27,8 +26,6 @@ module Guard
|
|
27
26
|
# The output directory
|
28
27
|
# @option options [Array<String>] :load_paths
|
29
28
|
# List of directories you can @import from
|
30
|
-
# @option options [Boolean] :notification
|
31
|
-
# Whether to show notifications
|
32
29
|
# @option options [Boolean] :shallow
|
33
30
|
# Whether to output nested directories
|
34
31
|
# @option options [Boolean] :debug_info
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-05 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard
|
16
|
-
requirement: &
|
16
|
+
requirement: &2153143420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.4.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2153143420
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: sass
|
27
|
-
requirement: &
|
27
|
+
requirement: &2153142660 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '3.1'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2153142660
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
38
|
-
requirement: &
|
38
|
+
requirement: &2153141740 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.0.2
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2153141740
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rspec
|
49
|
-
requirement: &
|
49
|
+
requirement: &2153141060 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>'
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: 2.0.0.rc
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2153141060
|
58
58
|
description: Guard::Sass automatically rebuilds sass (like sass --watch)
|
59
59
|
email:
|
60
60
|
- m@hawx.me
|