sass-json-vars 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sass-json-vars/importer.rb +1 -1
- data/lib/sass-json-vars/version.rb +1 -1
- data/readme.md +11 -1
- data/test/fixtures/booleans/style.scss +7 -0
- data/test/fixtures/booleans/variables.json +3 -0
- data/test/fixtures/maps/style.scss +2 -2
- data/test/fixtures/maps/variables.json +4 -2
- data/test/fixtures/nesting/booleans.scss +7 -0
- data/test/fixtures/nesting/numbers.scss +5 -0
- data/test/fixtures/nesting/strings.scss +5 -0
- data/test/fixtures/nesting/variables.json +11 -0
- data/test/sass-json-vars_test.rb +20 -0
- metadata +24 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9092fdab6ba204da63c33f61b8ece2c93972d17
|
4
|
+
data.tar.gz: d92eb0be9ab3e178df3de3dd32184d18dc08d9e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8edb745f7b09db21533ac174be66bebdecf6da492b353934bcef24e3c82193148d1134e0d8ffa8487ac3d9f50a526cb08f53ab0e47951fd7a1a7d7a4051c02a
|
7
|
+
data.tar.gz: ebb20ad02ec38c7e45099f1aa7e3009bcdb7fa395ab8a3206f39683dcd343436cb05c47907c5925abd2633b6a746b5d960e21a8bad892a0b97be5bb5b9fd604b
|
data/readme.md
CHANGED
@@ -16,7 +16,9 @@
|
|
16
16
|
gem install sass-json-vars
|
17
17
|
```
|
18
18
|
|
19
|
-
|
19
|
+
After that reload rails server if you are on rails.
|
20
|
+
|
21
|
+
#### For projects using Sass >= 3.3
|
20
22
|
|
21
23
|
|
22
24
|
Place variables in a JSON file:
|
@@ -77,3 +79,11 @@ Require sass-json-vars when compiling
|
|
77
79
|
```shell
|
78
80
|
sass style.scss -r sass-json-vars
|
79
81
|
```
|
82
|
+
|
83
|
+
### What about node-sass?
|
84
|
+
|
85
|
+
Take a look at
|
86
|
+
[node-sass-json-importer](https://github.com/Updater/node-sass-json-importer)
|
87
|
+
for a libsass variant of this project:
|
88
|
+
|
89
|
+
https://github.com/Updater/node-sass-json-importer
|
data/test/sass-json-vars_test.rb
CHANGED
@@ -18,4 +18,24 @@ class SassJSONVarsTest < Test::Unit::TestCase
|
|
18
18
|
scss = Sass.compile_file("test/fixtures/maps/style.scss")
|
19
19
|
assert_equal "body {\n color: #cc3333; }\n", scss
|
20
20
|
end
|
21
|
+
|
22
|
+
def test_booleans
|
23
|
+
scss = Sass.compile_file("test/fixtures/booleans/style.scss")
|
24
|
+
assert_equal "body {\n color: blue; }\n", scss
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_nesting_booleans
|
28
|
+
scss = Sass.compile_file("test/fixtures/nesting/booleans.scss")
|
29
|
+
assert_equal "body {\n color: red; }\n", scss
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_nesting_strings
|
33
|
+
scss = Sass.compile_file("test/fixtures/nesting/strings.scss")
|
34
|
+
assert_equal "body {\n color: red; }\n", scss
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_nesting_numbers
|
38
|
+
scss = Sass.compile_file("test/fixtures/nesting/numbers.scss")
|
39
|
+
assert_equal "body {\n padding: 10px; }\n", scss
|
40
|
+
end
|
21
41
|
end
|
metadata
CHANGED
@@ -1,58 +1,59 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass-json-vars
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nate Hunzaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: simplecov
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.7.1
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.7.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: coveralls
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description:
|
55
|
+
description: A Ruby Sass custom importer that allows the use of JSON to declare variables
|
56
|
+
with @import 'file.json'.
|
56
57
|
email:
|
57
58
|
- nate.hunzaker@viget.com
|
58
59
|
executables: []
|
@@ -65,10 +66,16 @@ files:
|
|
65
66
|
- lib/sass-json-vars/monkeypatch.rb
|
66
67
|
- lib/sass-json-vars/version.rb
|
67
68
|
- readme.md
|
69
|
+
- test/fixtures/booleans/style.scss
|
70
|
+
- test/fixtures/booleans/variables.json
|
68
71
|
- test/fixtures/lists/style.scss
|
69
72
|
- test/fixtures/lists/variables.json
|
70
73
|
- test/fixtures/maps/style.scss
|
71
74
|
- test/fixtures/maps/variables.json
|
75
|
+
- test/fixtures/nesting/booleans.scss
|
76
|
+
- test/fixtures/nesting/numbers.scss
|
77
|
+
- test/fixtures/nesting/strings.scss
|
78
|
+
- test/fixtures/nesting/variables.json
|
72
79
|
- test/fixtures/sass/style.sass
|
73
80
|
- test/fixtures/sass/variables.json
|
74
81
|
- test/fixtures/strings/style.scss
|
@@ -87,12 +94,12 @@ require_paths:
|
|
87
94
|
- lib
|
88
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
89
96
|
requirements:
|
90
|
-
- -
|
97
|
+
- - ">="
|
91
98
|
- !ruby/object:Gem::Version
|
92
99
|
version: '0'
|
93
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
101
|
requirements:
|
95
|
-
- -
|
102
|
+
- - ">="
|
96
103
|
- !ruby/object:Gem::Version
|
97
104
|
version: '0'
|
98
105
|
requirements: []
|
@@ -102,10 +109,16 @@ signing_key:
|
|
102
109
|
specification_version: 4
|
103
110
|
summary: Allows the use of JSON to declare variables with @import 'file.json'.
|
104
111
|
test_files:
|
112
|
+
- test/fixtures/booleans/style.scss
|
113
|
+
- test/fixtures/booleans/variables.json
|
105
114
|
- test/fixtures/lists/style.scss
|
106
115
|
- test/fixtures/lists/variables.json
|
107
116
|
- test/fixtures/maps/style.scss
|
108
117
|
- test/fixtures/maps/variables.json
|
118
|
+
- test/fixtures/nesting/booleans.scss
|
119
|
+
- test/fixtures/nesting/numbers.scss
|
120
|
+
- test/fixtures/nesting/strings.scss
|
121
|
+
- test/fixtures/nesting/variables.json
|
109
122
|
- test/fixtures/sass/style.sass
|
110
123
|
- test/fixtures/sass/variables.json
|
111
124
|
- test/fixtures/strings/style.scss
|