js_dependency 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.js_dependency.yml.sample +1 -1
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/README.md +12 -1
- data/lib/js_dependency/mermaid/root.rb +1 -1
- data/lib/js_dependency/version.rb +1 -1
- data/lib/js_dependency.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bf7cfb1d29636defe8ab5e05990af5d95e80f5dc383ff1e3bb56233f6458cd6
|
4
|
+
data.tar.gz: 426a15952e30fe085bfa93c3ab5fbdb1a1f8e19323c01cddc83d3744a41a9269
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea9dd1783d4c7d6ea1c7a205c49fbb55fd73ba947d474c87e700b4e8ad52e93a2ce0816ddfc0f3df78c9bc689c7b7f3037196e7ddd1d73d701616ff5f4234364
|
7
|
+
data.tar.gz: c2020ea6afcef60232a53b2846f7ba972b15c6600659bc18197f68708187f2d75bd0349011297b3e98201428cbc31f8d617f5999d29010d0293a433fc96a2b47
|
data/.js_dependency.yml.sample
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -29,7 +29,18 @@ parent_analyze_level: 2 # Output level of parent analyze
|
|
29
29
|
name_level: 1 # Output name level
|
30
30
|
output_path: ./mermaid.txt # Output file path
|
31
31
|
alias_paths: # Alias path
|
32
|
-
"@": ./
|
32
|
+
"@": ./pages # absolute path or relative path of src_path
|
33
|
+
```
|
34
|
+
|
35
|
+
Each parameter is overridden by the command line.
|
36
|
+
|
37
|
+
```
|
38
|
+
src_path -> -s
|
39
|
+
target_path -> -t
|
40
|
+
child_analyze_level -> -c
|
41
|
+
parent_analyze_level -> -p
|
42
|
+
name_level -> -n
|
43
|
+
output_path -> -o
|
33
44
|
```
|
34
45
|
|
35
46
|
#### Export Mermaid Format
|
@@ -17,7 +17,7 @@ module JsDependency
|
|
17
17
|
|
18
18
|
def export(name_level: 1)
|
19
19
|
str = "flowchart #{orientation}\n"
|
20
|
-
str + @list.
|
20
|
+
str + @list.uniq { |link| "#{link.parent}__#{link.child}" }.sort_by { |link| "#{link.parent}__#{link.child}" }.map do |link|
|
21
21
|
"#{link.parent_module_name(name_level)} --> #{link.child_module_name(name_level)}"
|
22
22
|
end.join("\n")
|
23
23
|
end
|
data/lib/js_dependency.rb
CHANGED
@@ -57,7 +57,7 @@ module JsDependency
|
|
57
57
|
list << parent_path
|
58
58
|
end
|
59
59
|
output = list.uniq
|
60
|
-
output_pathname&.write(output)
|
60
|
+
output_pathname&.write(output.sort.join("\n"))
|
61
61
|
output
|
62
62
|
end
|
63
63
|
|
@@ -75,7 +75,7 @@ module JsDependency
|
|
75
75
|
list << child_path
|
76
76
|
end
|
77
77
|
output = list.uniq
|
78
|
-
output_pathname&.write(output)
|
78
|
+
output_pathname&.write(output.sort.join("\n"))
|
79
79
|
output
|
80
80
|
end
|
81
81
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: js_dependency
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- junara
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pathname
|