jekyll-sass-converter 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/jekyll-sass-converter.rb +2 -0
- data/lib/jekyll-sass-converter/version.rb +3 -1
- data/lib/jekyll/converters/sass.rb +6 -4
- data/lib/jekyll/converters/scss.rb +11 -11
- metadata +22 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 52a798a1317d03f0041ac3a290181648f3927597c44802d3fb4191d4e509cd56
|
4
|
+
data.tar.gz: 8307478924c12659dc442511eabaabf9ffb929bd10b54d8f086632ae4064fabc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cd772d0f2b83fcd869014e130a07b0bd7f5810ab294baf20298fae201608f34f699148bdead25dbb56fb406a3a768d36b52aa002db126010b72695bc5be2241
|
7
|
+
data.tar.gz: 3539bc4b557030210c0426e97cbedc368d6677d6f89e2a1747aad8d5baa4f5e3185530d9fed38dd49827bb08b5cc581b4a39ebf911595913559e962f78c63589
|
@@ -1,6 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "sass"
|
4
|
+
require "jekyll/utils"
|
5
|
+
require "jekyll/converters/scss"
|
4
6
|
|
5
7
|
module Jekyll
|
6
8
|
module Converters
|
@@ -9,7 +11,7 @@ module Jekyll
|
|
9
11
|
priority :low
|
10
12
|
|
11
13
|
def matches(ext)
|
12
|
-
ext =~
|
14
|
+
ext =~ %r!^\.sass$!i
|
13
15
|
end
|
14
16
|
|
15
17
|
def syntax
|
@@ -1,12 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "sass"
|
4
|
+
require "jekyll/utils"
|
5
5
|
|
6
6
|
module Jekyll
|
7
7
|
module Converters
|
8
8
|
class Scss < Converter
|
9
|
-
BYTE_ORDER_MARK =
|
9
|
+
BYTE_ORDER_MARK = %r!^\xEF\xBB\xBF!
|
10
10
|
SyntaxError = Class.new(ArgumentError)
|
11
11
|
|
12
12
|
safe true
|
@@ -15,10 +15,10 @@ module Jekyll
|
|
15
15
|
ALLOWED_STYLES = %w(nested expanded compact compressed).freeze
|
16
16
|
|
17
17
|
def matches(ext)
|
18
|
-
ext =~
|
18
|
+
ext =~ %r!^\.scss$!i
|
19
19
|
end
|
20
20
|
|
21
|
-
def output_ext(
|
21
|
+
def output_ext(_ext)
|
22
22
|
".css"
|
23
23
|
end
|
24
24
|
|
@@ -29,7 +29,7 @@ module Jekyll
|
|
29
29
|
def jekyll_sass_configuration
|
30
30
|
options = @config["sass"] || {}
|
31
31
|
unless options["style"].nil?
|
32
|
-
options["style"] = options["style"].to_s.gsub(
|
32
|
+
options["style"] = options["style"].to_s.gsub(%r!\A:!, "").to_sym
|
33
33
|
end
|
34
34
|
options
|
35
35
|
end
|
@@ -40,7 +40,7 @@ module Jekyll
|
|
40
40
|
:load_paths => sass_load_paths,
|
41
41
|
:syntax => syntax,
|
42
42
|
:style => sass_style,
|
43
|
-
:cache => false
|
43
|
+
:cache => false,
|
44
44
|
}
|
45
45
|
else
|
46
46
|
Jekyll::Utils.symbolize_hash_keys(
|
@@ -111,16 +111,16 @@ module Jekyll
|
|
111
111
|
sass_build_configuration_options({
|
112
112
|
"syntax" => syntax,
|
113
113
|
"cache" => allow_caching?,
|
114
|
-
"load_paths" => sass_load_paths
|
114
|
+
"load_paths" => sass_load_paths,
|
115
115
|
})
|
116
116
|
end
|
117
117
|
|
118
118
|
def convert(content)
|
119
119
|
output = ::Sass.compile(content, sass_configs)
|
120
|
-
replacement = add_charset? ? '@charset "UTF-8";' :
|
120
|
+
replacement = add_charset? ? '@charset "UTF-8";' : ""
|
121
121
|
output.sub(BYTE_ORDER_MARK, replacement)
|
122
122
|
rescue ::Sass::SyntaxError => e
|
123
|
-
raise SyntaxError
|
123
|
+
raise SyntaxError, "#{e} on line #{e.sass_line}"
|
124
124
|
end
|
125
125
|
|
126
126
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-sass-converter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parker Moore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.5'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: jekyll
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,19 +81,19 @@ dependencies:
|
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
84
|
+
name: rubocop
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- - "
|
87
|
+
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
89
|
+
version: '0.51'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- - "
|
94
|
+
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
96
|
+
version: '0.51'
|
83
97
|
description:
|
84
98
|
email:
|
85
99
|
- parkrmoore@gmail.com
|
@@ -111,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
125
|
version: '0'
|
112
126
|
requirements: []
|
113
127
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.7.1
|
115
129
|
signing_key:
|
116
130
|
specification_version: 4
|
117
131
|
summary: A basic Sass converter for Jekyll.
|