vstheme2scss 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vstheme2scss/converter.rb +10 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d142966c9ec62c7ddcce4bfcdaef3a90e665e27a2ed2ac9dab6bad65339490a
|
4
|
+
data.tar.gz: 95c1216307aa2a202d2ca75fdd36f177a43e75b2d69f2055be5adcac4e02eb93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99dcebdb2458d422e983422af4686be1f10d08d0f8c924447799280cccfd9e24493eee92d0837c8bfd9433b0eccfb5c0bd3b2382c2f5187f75ff55e3752436f1
|
7
|
+
data.tar.gz: 532375c03964603b1722dd16c27590882ddb03db2a2856ba5c493bc35db424f5e7deb2167a7e7cb0c310e28eedfb83a52dcee0cd821d59caf45a81e3c5bd820e
|
@@ -42,13 +42,8 @@ module Converter
|
|
42
42
|
}.select{ |theme| theme != nil }
|
43
43
|
end
|
44
44
|
|
45
|
-
def
|
46
|
-
|
47
|
-
puts "Error: Missing output file"
|
48
|
-
exit
|
49
|
-
end
|
50
|
-
|
51
|
-
theme_logic = "\n" + '@mixin themify($themes) {' + "\n"\
|
45
|
+
def get_theme_logic()
|
46
|
+
"\n" + '@mixin themify($themes) {' + "\n"\
|
52
47
|
' @each $theme, $map in $themes {' + "\n"\
|
53
48
|
' .theme-#{$theme} & {' + "\n"\
|
54
49
|
' $theme-map: () !global;' + "\n"\
|
@@ -65,7 +60,15 @@ module Converter
|
|
65
60
|
'@function themed($key) {' + "\n"\
|
66
61
|
' @return map-get($theme-map, $key);' + "\n"\
|
67
62
|
'}'
|
63
|
+
end
|
64
|
+
|
65
|
+
def make_files(options, themes)
|
66
|
+
if not options[:out_file]
|
67
|
+
puts "Error: Missing output file"
|
68
|
+
exit
|
69
|
+
end
|
68
70
|
|
71
|
+
theme_logic = get_theme_logic()
|
69
72
|
out_path = Pathname.new(options[:out_file])
|
70
73
|
json_res = theme_files_to_hash(themes)
|
71
74
|
out_res = json_res.map{ |theme| build_scss_theme(theme) }.join("\n")
|