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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c3c24ad458ab62df198ebb779c5a9142a7bff0aee92bb95a9bc88061192045c
4
- data.tar.gz: e9d6e041aee4a8df90c3ebc850474f2c8f6ad808ac07368fdfc8bec009a7b463
3
+ metadata.gz: 5bf7cfb1d29636defe8ab5e05990af5d95e80f5dc383ff1e3bb56233f6458cd6
4
+ data.tar.gz: 426a15952e30fe085bfa93c3ab5fbdb1a1f8e19323c01cddc83d3744a41a9269
5
5
  SHA512:
6
- metadata.gz: 2fdda6bc1addc027df2fcfdb802bd5fa2c413422e80bf7c89d99532cc0bdff1fd47fed2c17fdfb675662b5ea8fc545235e0764a804db67d1e8a49ebf66f76c19
7
- data.tar.gz: 38923fd2655a8c60b2e844df0075256eb1e8bbb7d92bd07cc9330551846fbd730f3a7e1f75ac2a8a93f680c6beff8eafcec10f2b407f9a69c4df78ab160aad2d
6
+ metadata.gz: ea9dd1783d4c7d6ea1c7a205c49fbb55fd73ba947d474c87e700b4e8ad52e93a2ce0816ddfc0f3df78c9bc689c7b7f3037196e7ddd1d73d701616ff5f4234364
7
+ data.tar.gz: c2020ea6afcef60232a53b2846f7ba972b15c6600659bc18197f68708187f2d75bd0349011297b3e98201428cbc31f8d617f5999d29010d0293a433fc96a2b47
@@ -5,4 +5,4 @@ parent_analyze_level: 2
5
5
  name_level: 1
6
6
  output_path: ./mermaid.txt
7
7
  alias_paths:
8
- "@": ./src
8
+ "@": ./pages
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.1] - 2022-07-20
4
+
5
+ - Output parents and children cli with line brake and sort.
6
+ - Output mermaid with parent and child string sorting.
7
+
3
8
  ## [0.2.0] - 2022-07-19
4
9
 
5
10
  - Add CLI interface.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- js_dependency (0.2.0)
4
+ js_dependency (0.2.1)
5
5
  pathname
6
6
  thor
7
7
  yaml
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
- "@": ./src
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.sort_by(&:parent).uniq { |link| "#{link.parent}__#{link.child}" }.map do |link|
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JsDependency
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  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.0
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-19 00:00:00.000000000 Z
11
+ date: 2022-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pathname