vstheme2scss 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vstheme2scss/converter.rb +10 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55516761c0e823c6aea0fdb0142bf8d4ccaeb0a2c9001e6350df6c66c6256aa9
4
- data.tar.gz: 74685ac3d99dccbe0e594dffb3e42470196a8386b902ffb7ffefaefdf873845d
3
+ metadata.gz: 6d142966c9ec62c7ddcce4bfcdaef3a90e665e27a2ed2ac9dab6bad65339490a
4
+ data.tar.gz: 95c1216307aa2a202d2ca75fdd36f177a43e75b2d69f2055be5adcac4e02eb93
5
5
  SHA512:
6
- metadata.gz: 132bfbd800793de519a622dfd6cc5bc2a185b738cd5774cdb2b94fc75b81761c72dad932a9ebd3c48cc7b4c5b22ab1b666764c0d8dc783ea4ebf30ded38873b5
7
- data.tar.gz: eb642872a5cd5859018447d6e0df28eb755e8fd3bc7d08e688b15cb8a525faaa5f606549974c78d1fe9203aa480dd86d1744af8b8bb3b772744f33ebf96eaa9d
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 make_files(options, themes)
46
- if not options[:out_file]
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")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vstheme2scss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Kruhlmann