nanoc-dart-sass 1.0.2 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +12 -0
- data/lib/nanoc/dart_sass/filter.rb +41 -9
- data/lib/nanoc/dart_sass/version.rb +1 -1
- metadata +14 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00b8a5410aedb44c77a639f2607d9769df7d5fac58f331d576980b3958f362c5
|
4
|
+
data.tar.gz: 85e761f9c95f6c3f5cea82e438a7f7b1b3b7b92b4def0ad0beca8f5c96bade4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 634b5c0a938d24fee988c2dd17de69ae97d0333da032ee48c3b99c4fb165693b4047353665838edd28976bb1cdd33012eb7df4a3b10a3650574a98e597ab6b7e
|
7
|
+
data.tar.gz: 6cf0ceccc71587928aecaa1322a23a40baaf15e4511f5085b40a00384805f2d7e00f093f878b1023804652f11916be82556fb07d258dedd313127ffce5761421
|
data/NEWS.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# nanoc-dart-sass news
|
2
2
|
|
3
|
+
## 1.0.4 (2024-11-04)
|
4
|
+
|
5
|
+
Fixes:
|
6
|
+
|
7
|
+
- Fixed imports on Windows, by stripping drive identifier (#1703, #1716)
|
8
|
+
|
9
|
+
## 1.0.3 (2024-04-19)
|
10
|
+
|
11
|
+
Enhancements:
|
12
|
+
|
13
|
+
- Added support for importing partials and directories (#1690, #1699)
|
14
|
+
|
3
15
|
## 1.0.2 (2023-09-30)
|
4
16
|
|
5
17
|
- Fix dart-sass compatibility (#1664)
|
@@ -20,7 +20,7 @@ module Nanoc
|
|
20
20
|
content,
|
21
21
|
importer: NanocImporter.new(@items, item),
|
22
22
|
**params,
|
23
|
-
syntax
|
23
|
+
syntax:,
|
24
24
|
)
|
25
25
|
result.css
|
26
26
|
end
|
@@ -54,10 +54,7 @@ module Nanoc
|
|
54
54
|
def find_item_for_url(url)
|
55
55
|
pat = url.sub(/\Ananoc:/, '')
|
56
56
|
|
57
|
-
|
58
|
-
if pat.match?(%r{(/|^)[^.]+$})
|
59
|
-
pat += '.*'
|
60
|
-
end
|
57
|
+
is_extension_given = !pat.match?(%r{(/|^)[^.]+$})
|
61
58
|
|
62
59
|
# Convert to absolute pattern
|
63
60
|
pat =
|
@@ -65,16 +62,51 @@ module Nanoc
|
|
65
62
|
pat
|
66
63
|
else
|
67
64
|
dirname = File.dirname(@source_item.identifier.to_s)
|
68
|
-
|
65
|
+
Nanoc::Core::Utils.expand_path_without_drive_identifier(pat, dirname)
|
69
66
|
end
|
70
67
|
|
71
|
-
|
68
|
+
items = collect_items(pat, is_extension_given)
|
72
69
|
|
73
|
-
|
70
|
+
# Get the single matching item, or error if there isn’t exactly one
|
71
|
+
items = items.compact
|
72
|
+
case items.size
|
73
|
+
when 0
|
74
74
|
raise "Could not find an item matching pattern `#{pat}`"
|
75
|
+
when 1
|
76
|
+
items.first
|
77
|
+
else
|
78
|
+
raise "It is not clear which item to import. Multiple items match `#{pat}`: #{items.map { _1.identifier.to_s }.sort.join(', ')}"
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# Given a pattern, return a collection of items that match this pattern.
|
83
|
+
# This goes beyond what Nanoc patterns typically support by e.g.
|
84
|
+
# supporting partials and index imports.
|
85
|
+
def collect_items(pat, is_extension_given)
|
86
|
+
items = []
|
87
|
+
|
88
|
+
# Try as a regular path
|
89
|
+
items.concat(try_pat(pat, is_extension_given))
|
90
|
+
|
91
|
+
# Try as a partial
|
92
|
+
partial_pat = File.join(File.dirname(pat), "_#{File.basename(pat)}")
|
93
|
+
items.concat(try_pat(partial_pat, is_extension_given))
|
94
|
+
|
95
|
+
# Try as index
|
96
|
+
unless is_extension_given
|
97
|
+
items.concat(@items.find_all(File.join(pat, '/index.*')))
|
98
|
+
items.concat(@items.find_all(File.join(pat, '/_index.*')))
|
75
99
|
end
|
76
100
|
|
77
|
-
|
101
|
+
items
|
102
|
+
end
|
103
|
+
|
104
|
+
def try_pat(pat, is_extension_given)
|
105
|
+
if is_extension_given
|
106
|
+
@items.find_all(pat)
|
107
|
+
else
|
108
|
+
@items.find_all("#{pat}.*")
|
109
|
+
end
|
78
110
|
end
|
79
111
|
end
|
80
112
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc-dart-sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nanoc-core
|
@@ -16,14 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '4.
|
19
|
+
version: '4.13'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 4.13.1
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '4.
|
29
|
+
version: '4.13'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 4.13.1
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: sass-embedded
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -51,11 +57,12 @@ files:
|
|
51
57
|
- lib/nanoc/dart_sass.rb
|
52
58
|
- lib/nanoc/dart_sass/filter.rb
|
53
59
|
- lib/nanoc/dart_sass/version.rb
|
54
|
-
homepage: https://nanoc.
|
60
|
+
homepage: https://nanoc.app/
|
55
61
|
licenses:
|
56
62
|
- MIT
|
57
63
|
metadata:
|
58
64
|
rubygems_mfa_required: 'true'
|
65
|
+
source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-dart-sass-v1.0.4/nanoc-dart-sass
|
59
66
|
post_install_message:
|
60
67
|
rdoc_options: []
|
61
68
|
require_paths:
|
@@ -64,14 +71,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
64
71
|
requirements:
|
65
72
|
- - ">="
|
66
73
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
74
|
+
version: '3.1'
|
68
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
76
|
requirements:
|
70
77
|
- - ">="
|
71
78
|
- !ruby/object:Gem::Version
|
72
79
|
version: '0'
|
73
80
|
requirements: []
|
74
|
-
rubygems_version: 3.
|
81
|
+
rubygems_version: 3.5.21
|
75
82
|
signing_key:
|
76
83
|
specification_version: 4
|
77
84
|
summary: Dart Sass filter for Nanoc
|