guard-concat 0.0.2 → 0.0.3
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/Readme.md +4 -5
- data/lib/guard/concat.rb +1 -17
- data/lib/guard/concat/templates/Guardfile +3 -5
- metadata +3 -3
data/Readme.md
CHANGED
@@ -24,10 +24,9 @@ And then add a basic setup to your Guardfile:
|
|
24
24
|
|
25
25
|
|
26
26
|
``` ruby
|
27
|
-
|
28
|
-
|
29
|
-
guard :concat, type: "js", files: %w(b a), input_dir: "public/js", output: "public/js/all"
|
27
|
+
# This will concatenate the javascript files a.js and b.js in public/js to all.js
|
28
|
+
guard :concat, type: "js", files: %w(b a), input_dir: "public/js", output: "public/js/all"
|
30
29
|
|
31
|
-
|
32
|
-
|
30
|
+
# analog css example
|
31
|
+
guard :concat, type: "css", files: %w(c d), input_dir: "public/css", output: "public/css/all"
|
33
32
|
```
|
data/lib/guard/concat.rb
CHANGED
@@ -5,7 +5,7 @@ require 'guard/watcher'
|
|
5
5
|
module Guard
|
6
6
|
class Concat < Guard
|
7
7
|
|
8
|
-
VERSION = '0.0.
|
8
|
+
VERSION = '0.0.3'
|
9
9
|
|
10
10
|
def initialize(watchers=[], opts={})
|
11
11
|
@output = "#{opts[:output]}.#{opts[:type]}"
|
@@ -45,21 +45,5 @@ module Guard
|
|
45
45
|
File.open(@output, "w"){ |f| f.write content.strip }
|
46
46
|
end
|
47
47
|
|
48
|
-
# def self.concat_unix(match, dest)
|
49
|
-
# p `cat "#{match}" > #{dest}`
|
50
|
-
# end
|
51
|
-
|
52
|
-
end
|
53
|
-
|
54
|
-
class Dsl
|
55
|
-
# def concat(dest)
|
56
|
-
# p self
|
57
|
-
# watcher = self.instance_variable_get("@watchers").last
|
58
|
-
# src = watcher.pattern
|
59
|
-
# Concat.concat src, dest
|
60
|
-
# # Notifier.notify "Concat done in #{dest}"
|
61
|
-
# end
|
62
48
|
end
|
63
49
|
end
|
64
|
-
|
65
|
-
# Guard::Concat.concat %r{public/js/(?!c).+.js}, "public/js/c.js"
|
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
guard :concat, type: "js", files: %w(), input_dir: "public/js", output: "public/js/all"
|
1
|
+
# This will concatenate the javascript files specified in :files to public/js/all.js
|
2
|
+
guard :concat, type: "js", files: %w(), input_dir: "public/js", output: "public/js/all"
|
4
3
|
|
5
|
-
|
6
|
-
end
|
4
|
+
guard :concat, type: "css", files: %w(), input_dir: "public/css", output: "public/css/all"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-concat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard
|
@@ -38,8 +38,8 @@ extra_rdoc_files: []
|
|
38
38
|
files:
|
39
39
|
- Readme.md
|
40
40
|
- LICENSE
|
41
|
-
- lib/guard/concat.rb
|
42
41
|
- lib/guard/concat/templates/Guardfile
|
42
|
+
- lib/guard/concat.rb
|
43
43
|
homepage: http://github.com/makevoid/guard-concat
|
44
44
|
licenses: []
|
45
45
|
post_install_message:
|