SassyExport 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +2 -11
  2. data/lib/SassyExport.rb +1 -1
  3. metadata +5 -5
data/README.md CHANGED
@@ -11,17 +11,6 @@ SassyExport is a lightweight plugin for [SassyJSON](https://github.com/HugoGirau
11
11
  ## Documentation
12
12
 
13
13
  #### Setup
14
- ```scss
15
- // ./sass/SassyExport.scss
16
-
17
- @mixin json_export($path, $filename, $map) {
18
- @at-root {
19
- %json_export {
20
- content: "#{SassyJSON_export(unquote($path), unquote($filename), unquote(json_encode($map)))}";
21
- }
22
- }
23
- }
24
- ```
25
14
 
26
15
  ```scss
27
16
  // ./sass/style.scss
@@ -42,6 +31,8 @@ New JSON file is created in `./json/hello.json`
42
31
  {"hello": "world"}
43
32
  ```
44
33
 
34
+ ====
35
+
45
36
  The `json_export()` mixin takes a directory `$path`, `$filename`, and a Sass `$map` as arguments. It then converts the `$map` into a JSON map with SassyJSON's `json_encode()` function, then Ruby creates a new file (or updates an existing file), and writes the contents of the json string to it. I'm no Ruby expert, so if you belive that you could improve the small amount of code here, feel free to.
46
37
 
47
38
  Enjoy.
data/lib/SassyExport.rb CHANGED
@@ -10,7 +10,7 @@ require "SassyJSON"
10
10
  # ----------------------------------------------------------------------------------------------------
11
11
 
12
12
  module SassyExport
13
- VERSION = "1.0.0"
13
+ VERSION = "1.0.1"
14
14
  DATE = "2014-05-31"
15
15
  end
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: SassyExport
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -16,17 +16,17 @@ dependencies:
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ~>
19
+ - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.0.0
21
+ version: 1.1.7
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ~>
27
+ - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
- version: 1.0.0
29
+ version: 1.1.7
30
30
  description: SassyExport allows you to export a Sass map into an external JSON file.
31
31
  email:
32
32
  - ezekg@yahoo.com