guard-less 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +10 -4
- data/lib/guard/less.rb +5 -14
- data/lib/guard/less/templates/Guardfile +1 -1
- data/lib/guard/less/version.rb +5 -0
- metadata +9 -24
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
# Guard-Less
|
2
2
|
|
3
|
+
A guard extension that compiles `.less` files to `.css` files when changed.
|
4
|
+
|
3
5
|
## Install
|
4
6
|
|
5
|
-
You will need to have [
|
7
|
+
You will need to have [Guard](https://github.com/guard/guard) first.
|
6
8
|
|
7
9
|
Install the gem with:
|
8
10
|
|
@@ -15,13 +17,17 @@ Add an initial setup to your Guardfile with:
|
|
15
17
|
|
16
18
|
## Usage
|
17
19
|
|
18
|
-
|
20
|
+
Please read [Guard usage doc](https://github.com/guard/guard#readme).
|
21
|
+
|
22
|
+
## Guardfile
|
19
23
|
|
20
24
|
guard 'less' do
|
21
|
-
watch(
|
25
|
+
watch(/.*\.less$/)
|
22
26
|
end
|
23
27
|
|
24
|
-
#
|
28
|
+
Please read [Guard doc](https://github.com/guard/guard#readme) for more info about Guardfile DSL.
|
29
|
+
|
30
|
+
# License
|
25
31
|
|
26
32
|
**Copyright (c) 2011 Brendan Erwin**
|
27
33
|
|
data/lib/guard/less.rb
CHANGED
@@ -1,33 +1,24 @@
|
|
1
|
-
#-*- Mode: ruby; tab-width: 2; indent-tabs-mode: nil;
|
2
|
-
|
3
1
|
require 'guard'
|
4
2
|
require 'guard/guard'
|
5
|
-
|
6
3
|
require 'less'
|
7
4
|
|
5
|
+
require File.dirname(__FILE__) + "/less/version"
|
6
|
+
|
8
7
|
module Guard
|
9
8
|
class Less < Guard
|
10
9
|
|
11
|
-
VERSION = '0.0.1'
|
12
|
-
|
13
|
-
def initialize(watchers = [], options = {})
|
14
|
-
super
|
15
|
-
|
16
|
-
@watchers = watchers
|
17
|
-
end
|
18
|
-
|
19
10
|
# ================
|
20
11
|
# = Guard method =
|
21
12
|
# ================
|
22
13
|
|
23
14
|
def start
|
24
|
-
|
15
|
+
UI.info "Guard::Less #{LessVersion::VERSION} is on the job!"
|
25
16
|
end
|
26
17
|
|
27
18
|
# Call with Ctrl-/ signal
|
28
19
|
# This method should be principally used for long action like running all specs/tests/...
|
29
20
|
def run_all
|
30
|
-
patterns = @watchers.map {|w| w.pattern}
|
21
|
+
patterns = @watchers.map { |w| w.pattern }
|
31
22
|
files = Dir.glob('**/*.*')
|
32
23
|
r = []
|
33
24
|
files.each do |file|
|
@@ -42,7 +33,7 @@ module Guard
|
|
42
33
|
def run_on_change(paths)
|
43
34
|
paths.each do |file|
|
44
35
|
unless File.basename(file)[0] == "_"
|
45
|
-
|
36
|
+
UI.info "lessc - #{file}\n"
|
46
37
|
`lessc #{file} --verbose`
|
47
38
|
end
|
48
39
|
end
|
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
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Brendan Erwin
|
@@ -14,11 +14,12 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-01-
|
17
|
+
date: 2011-01-05 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: guard
|
22
|
+
prerelease: false
|
22
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
24
|
none: false
|
24
25
|
requirements:
|
@@ -27,13 +28,13 @@ dependencies:
|
|
27
28
|
segments:
|
28
29
|
- 0
|
29
30
|
- 2
|
30
|
-
-
|
31
|
-
version: 0.2.
|
31
|
+
- 2
|
32
|
+
version: 0.2.2
|
32
33
|
type: :runtime
|
33
|
-
prerelease: false
|
34
34
|
version_requirements: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: less
|
37
|
+
prerelease: false
|
37
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
38
39
|
none: false
|
39
40
|
requirements:
|
@@ -44,24 +45,7 @@ dependencies:
|
|
44
45
|
- 2
|
45
46
|
version: "1.2"
|
46
47
|
type: :runtime
|
47
|
-
prerelease: false
|
48
48
|
version_requirements: *id002
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: rspec
|
51
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
|
-
requirements:
|
54
|
-
- - ~>
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
segments:
|
57
|
-
- 2
|
58
|
-
- 0
|
59
|
-
- 0
|
60
|
-
- rc
|
61
|
-
version: 2.0.0.rc
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: *id003
|
65
49
|
description: Guard::Less automatically compiles less (like lessc --watch)
|
66
50
|
email:
|
67
51
|
- brendanjerwin@gmail.com
|
@@ -73,10 +57,11 @@ extra_rdoc_files: []
|
|
73
57
|
|
74
58
|
files:
|
75
59
|
- lib/guard/less/templates/Guardfile
|
60
|
+
- lib/guard/less/version.rb
|
76
61
|
- lib/guard/less.rb
|
77
62
|
- README.md
|
78
63
|
has_rdoc: true
|
79
|
-
homepage:
|
64
|
+
homepage: https://github.com/guard/guard-less
|
80
65
|
licenses: []
|
81
66
|
|
82
67
|
post_install_message:
|