css2less-recursive 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.
- checksums.yaml +4 -4
- data/bin/css2less-recursive +2 -11
- data/lib/css2less/recursive/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 43e55380a5c6ffeca9aa1262ab09b1976d036df7
|
|
4
|
+
data.tar.gz: 0155b78abe8bfd74f81fb53975507fcea3197597
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5f14bbd2cce0ed2c1e79d523cabf11600440c835e9b56ed0b6fa9f4cd371188a489948ae4bae5dc3a6933d525acedec26dd9621d895ef865b766c5fa23be8d01
|
|
7
|
+
data.tar.gz: 79aec353dea6189255a72938554d17383eb978d99f89e0f90240a67f1f9d9a444914ebb67bc94d4c0116716e25f1cef7e1bfc9e5986fb92b6cb4bb9985f695bb
|
data/bin/css2less-recursive
CHANGED
|
@@ -3,17 +3,8 @@
|
|
|
3
3
|
require 'optparse'
|
|
4
4
|
require 'css2less'
|
|
5
5
|
|
|
6
|
-
options = {}
|
|
7
6
|
parser = OptionParser.new do |opts|
|
|
8
|
-
opts.banner = "Usage: css2less
|
|
9
|
-
|
|
10
|
-
opts.on("-c", "--colors", "Automatically extract colors from less") do |v|
|
|
11
|
-
options[:update_colors] = v
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
opts.on("-m", "--mixins", "Automatically extract vendor prefixed mixins") do |v|
|
|
15
|
-
options[:vendor_mixins] = v
|
|
16
|
-
end
|
|
7
|
+
opts.banner = "Usage: css2less-recursive folder"
|
|
17
8
|
|
|
18
9
|
opts.on_tail("-h", "--help", "Show this message") do
|
|
19
10
|
puts opts
|
|
@@ -34,6 +25,6 @@ folder = ARGV[0]
|
|
|
34
25
|
Dir.glob("#{folder}/**/*.css", File::FNM_DOTMATCH) do |f|
|
|
35
26
|
file = File.stat(f)
|
|
36
27
|
next unless file.file?
|
|
37
|
-
converter = Css2Less::Converter.new(f
|
|
28
|
+
converter = Css2Less::Converter.new(File.read(f))
|
|
38
29
|
File.write(f.gsub(/.css$/,'.less'), converter.process_less)
|
|
39
30
|
end
|