slim-grunt-helpers 0.3.0 → 0.4.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/README.md +1 -1
- data/lib/slim-grunt-helpers/models/usemin.rb +7 -0
- 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: 7dc5e08221840aa42d7e1f6c25bd9fd86bca041b
|
|
4
|
+
data.tar.gz: 0283607771c05df9b8c4adb39c168ba5dbfdc3fd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 812e295d31bb2e6a86a51d23e881319bc7d4ef424ba145bbb02df8665283e4432fefcd8513e4927a151c3866edaf63ac52c28b5255bc7eee81280b7fb5c6a14e
|
|
7
|
+
data.tar.gz: b15e88a86b1f956fdd27f0e32c3638c37a46451901ede93b3d5c12928865c98cffb0952725fcbb90a9b268351f0124c670f7dc8b33e3e6b89ddee37bc8add557
|
data/README.md
CHANGED
|
@@ -81,7 +81,7 @@ Additionally, notice that attributes with `nil` or `false` as value are not set
|
|
|
81
81
|
|
|
82
82
|
- `root_path` which is the path will be used as base directory (and **omitted in tags**)
|
|
83
83
|
- `pattern` which is the pattern accepted by [Dir glob](http://ruby-doc.org/core-1.9.3/Dir.html#method-c-glob), used to search files
|
|
84
|
-
- `options` which are directly passed to `require`
|
|
84
|
+
- `options` which accepts `:transform_ext` which will replace the file extension. Other options are directly passed to `require`
|
|
85
85
|
|
|
86
86
|
## Contributing
|
|
87
87
|
|
|
@@ -41,6 +41,13 @@ module SlimGruntHelpers
|
|
|
41
41
|
file_name = file.to_s
|
|
42
42
|
real_root_path = "#{ root_path }/"
|
|
43
43
|
file_name[real_root_path] = ''
|
|
44
|
+
transform_ext = options.delete(:transform_ext)
|
|
45
|
+
unless transform_ext.nil?
|
|
46
|
+
transform_ext = ".#{ transform_ext }" unless transform_ext[0] == '.'
|
|
47
|
+
|
|
48
|
+
origin_ext = File.extname(file_name)
|
|
49
|
+
file_name[origin_ext] = transform_ext
|
|
50
|
+
end
|
|
44
51
|
|
|
45
52
|
self.require file_name, options
|
|
46
53
|
end
|
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.
|
|
4
|
+
version: 0.4.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-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|