js_dependency 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/js_dependency/index_creator.rb +2 -2
- data/lib/js_dependency/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6012cddd2cb701448c1243a3b7cf444bc144852935460b00e3065518451c7ee
|
4
|
+
data.tar.gz: 9d5a37df572c77dae170431eb38d81133b0877a6d10a47492c5062579613a106
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 811ffb4340bb7b26ae1c19a51c369d052a032175bc655f194fa51c687167659b159ce877706532ad329bccc835b300cb007123a4c3864b81bc8625375b40471c
|
7
|
+
data.tar.gz: 73c92c3b0ecfdb9b2885810532f0d5556aac5881ee4e82429e01c712acee1ab56ea5d5459c3438909e168310d129ece31264cff29fb5f5618504554fa6f2e179
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.4.1] - 2024-04-01
|
4
|
+
|
5
|
+
- Add support ts and tsx file. [#38](https://github.com/junara/js_dependency/pull/38)
|
6
|
+
|
3
7
|
## [0.4.0] - 2024-03-31
|
4
8
|
|
5
9
|
- Breaking change: Support only Ruby 3.0 or later. [#34](https://github.com/junara/js_dependency/pull/34)
|
data/Gemfile.lock
CHANGED
@@ -42,14 +42,14 @@ module JsDependency
|
|
42
42
|
# @param [Array<String>] alias_paths
|
43
43
|
# @return [Hash]
|
44
44
|
def index_from(src_pathname, alias_paths)
|
45
|
-
pattern = %w[**/*.vue **/*.js **/*.jsx]
|
45
|
+
pattern = %w[**/*.vue **/*.js **/*.jsx **/*.ts **/*.tsx]
|
46
46
|
|
47
47
|
src_pathname.glob(pattern).each_with_object({}) do |component_pathname, obj|
|
48
48
|
import_pathnames = import_pathnames_from(component_pathname, alias_paths)
|
49
49
|
import_pathnames += src_javascript_pathnames_from(component_pathname, alias_paths)
|
50
50
|
|
51
51
|
obj[component_pathname.to_s] = import_pathnames.map(&:to_s)
|
52
|
-
if component_pathname.basename.to_s == "index.js"
|
52
|
+
if component_pathname.basename.to_s == "index.js" || component_pathname.basename.to_s == "index.ts"
|
53
53
|
obj[component_pathname.dirname.to_s] =
|
54
54
|
import_pathnames.map(&:to_s)
|
55
55
|
end
|