slim-grunt-helpers 0.0.5 → 0.1.0
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.
- checksums.yaml +4 -4
- data/lib/slim-grunt-helpers/models/usemin.rb +18 -2
- data/lib/slim-grunt-helpers/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20e8513107759c51072567f6a9bf8eaac947daf0
|
4
|
+
data.tar.gz: 189e753cea3c2c6cb8f8dc54c938ab10befa81f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 198b4fa59667f2a76f7a96153e56631757fdc07e13c500ecc9236a5566dc61cb20ce86af68920d2aa4a3ecaa8eee648dab2591ff577b0febd1a8ec06e83bbe76
|
7
|
+
data.tar.gz: 76d7483c61447ce79c5789c5dd7d22e1899b39e215a37701f7ff8acf2491bc2b3d9bbac7472697bc3334d580e318a54ee9fff7137019ccfa1c5686d5b3f21d4f
|
@@ -11,9 +11,14 @@ module SlimGruntHelpers
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def <<(path, options={})
|
14
|
-
@links << { path: path, options: base_options.merge(options) }
|
14
|
+
@links << { path: path.to_s, options: base_options.merge(options) }
|
15
|
+
end
|
16
|
+
alias_method :add, :<<
|
17
|
+
alias_method :include, :<<
|
18
|
+
|
19
|
+
def require(path, options={})
|
20
|
+
self.include(path, options) unless @links.include? path.to_s
|
15
21
|
end
|
16
|
-
alias_method :add, :<<
|
17
22
|
|
18
23
|
def each
|
19
24
|
@links.each { |link| yield(transform_link(link)) }
|
@@ -23,6 +28,17 @@ module SlimGruntHelpers
|
|
23
28
|
BASE_OPTIONS
|
24
29
|
end
|
25
30
|
|
31
|
+
def require_tree(root_path, pattern, options={})
|
32
|
+
Dir[root_path.join(pattern)].reject do |file|
|
33
|
+
File.directory? file
|
34
|
+
end.each do |file|
|
35
|
+
file_name = file.to_s
|
36
|
+
file_name["#{ root_path }/"] = ''
|
37
|
+
|
38
|
+
self.require file_name, options
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
26
42
|
protected
|
27
43
|
|
28
44
|
def transform_link(link)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slim-grunt-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fire-Dragon-DoL
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|