yk_command 0.3.0 → 0.3.3

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: '09f298ea39bbf5583da6754e78bd75ba35bd9eb427bfcc1fbcaa4e8081f64684'
4
- data.tar.gz: 495609aec6ee33450a5e176cea96766263e7b0257fec891171ae39be05f57bec
3
+ metadata.gz: 4b49f365c88cbf5ee075910240c942e69f1b8b8664924ede94580f16112bc793
4
+ data.tar.gz: 7f6f89f46517311f2e7f53ec67b797f3eb62c88c5309379656ab9c29d964f483
5
5
  SHA512:
6
- metadata.gz: f889ff17f4b84cba81fc5749ad432c60a6c160595b1caad6f80ba4c34a5b95e62a03fd53b6279dd2c133a02ebe2ab3128dfc03e88b526bc99787cd2afbfa6ef2
7
- data.tar.gz: d193874649d597236bc5e07e795bb543d61b30fa12f4b6152240d1ccfda9c7ba203b9ef0147562ea89f20cb157f0d4dcef31d3457bca2d0a27c29f537a67b797
6
+ metadata.gz: 024c3862ab8543cbcd93dc4da9d13f3e5b452e8a5cd08b5a2a1389f6f1f11175bce32925ae0608e675f7acf1fbc6b15e029f72f19ecc75299cad151577209dce
7
+ data.tar.gz: 3224b9d71c410180fce7d8ee96859bd9eeae55e9c48e478b7d350306bd0c8e1ad4abc27a4ca55405630af09a825c6a1c04ddcfaadc84961605424fd2f4a52d47
@@ -1,5 +1,5 @@
1
1
  ---
2
- :project: SYTHomeModule
3
- :language: objc
2
+ :project: MerchanHome
3
+ :language: swift
4
4
  :class_prefix: YK
5
5
  :author: Tom.Liu
data/.idea/vcs.xml CHANGED
@@ -4,6 +4,7 @@
4
4
  <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
5
  <mapping directory="$PROJECT_DIR$/CXFApp" vcs="Git" />
6
6
  <mapping directory="$PROJECT_DIR$/CXFAppHome" vcs="Git" />
7
+ <mapping directory="$PROJECT_DIR$/MerchanHome" vcs="Git" />
7
8
  <mapping directory="$PROJECT_DIR$/MerchantHome" vcs="Git" />
8
9
  <mapping directory="$PROJECT_DIR$/SUHome3" vcs="Git" />
9
10
  <mapping directory="$PROJECT_DIR$/SYTHomeModule" vcs="Git" />
data/Gemfile.lock CHANGED
@@ -1,7 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yk_command (0.3.0)
4
+ yk_command (0.3.2)
5
+ bundler
6
+ colored
7
+ thor
8
+ xcodeproj
5
9
 
6
10
  GEM
7
11
  remote: https://rubygems.org/
@@ -100,6 +100,7 @@ module YkCommand
100
100
 
101
101
  first_level_folders = %w[Public Private]
102
102
  public_level_folders = ['Register']
103
+
103
104
  private_level_folders = %w[Business Category Vendor Tools]
104
105
 
105
106
  first_level_folders.each do |folder|
@@ -115,13 +116,6 @@ module YkCommand
115
116
  private_level_folders.each do |folder|
116
117
  path = "#{class_folder_path}/Private/#{folder}"
117
118
  empty_directory path
118
- if folder == 'Business'
119
-
120
- else
121
- system "touch \"#{path}/EmptyFile.m\""
122
- end
123
-
124
-
125
119
  end
126
120
  end
127
121
 
@@ -141,19 +135,53 @@ module YkCommand
141
135
  template "#{__dir__}/template/objc/#{file_name}", final_file
142
136
  end
143
137
 
144
- template_code_filename = ['ServiceProtocol.h','RouterDefine.h']
145
138
  public_folder_path = "#{@final_path}/#{@name}/Classes/Public"
139
+
140
+ template_code_filename = ['ServiceProtocol.h','RouterDefine.h']
146
141
  template_code_filename.each do |file_name|
147
142
  final_file = "#{public_folder_path}/#{@prefixed_module}#{file_name}"
148
143
  source = "#{__dir__}/template/objc/#{file_name}"
149
144
  template source, final_file
150
145
  end
151
146
 
147
+ swift_template_code_filename = ['RouterDefine.swift']
148
+ swift_template_code_filename.each do |file_name|
149
+ final_file = "#{public_folder_path}/#{@prefixed_module}_Swift_#{file_name}"
150
+ source = "#{__dir__}/template/swift/#{file_name}"
151
+ template source, final_file
152
+ end
153
+
154
+
155
+
156
+ private_folder_path = "#{@final_path}/#{@name}/Classes/Private"
157
+ #pch file
158
+ # pch_file_name = "PrefixHeader.pch"
159
+ # final_file = "#{private_folder_path}/#{@prefixed_module}#{pch_file_name}"
160
+ # source = "#{__dir__}/template/objc/#{pch_file_name}"
161
+ # template source, final_file
162
+
163
+ private_level_folder_files = {
164
+ 'PrefixHeader.pch' => 'Business',
165
+ 'CategoryHeader.h' => 'Category',
166
+ 'ToolsHeader.h' => 'Tools',
167
+ 'vendorHeader.h' => 'Vendor'
168
+ }
169
+
170
+ private_level_folder_files.each do |file_name, folder|
171
+ final_prefix = @prefixed_module
172
+ if file_name == 'PrefixHeader.pch'
173
+ final_prefix = @module
174
+ end
175
+
176
+ final_file = "#{private_folder_path}/#{folder}/#{final_prefix}#{file_name}"
177
+ source = "#{__dir__}/template/objc/#{file_name}"
178
+ template source, final_file
179
+ end
152
180
 
153
181
  business_demo_path = "#{@final_path}/#{@name}/Classes/Private/Business"
154
182
  demo_replace_file = ['DemoViewController.h','DemoViewController.m','DemoViewModel.h','DemoViewModel.m']
155
183
  demo_replace_file.each do |file_name|
156
- final_file = "#{business_demo_path}/#{@prefixed_module}#{file_name}"
184
+ final_file = "#{business_demo_path}/Demo/#{@prefixed_module}#{file_name}"
157
185
  source = "#{__dir__}/template/objc/demo/#{file_name}"
158
186
  template source, final_file
159
187
  end
@@ -161,7 +189,7 @@ module YkCommand
161
189
 
162
190
 
163
191
  Dir.chdir("#{@final_path}/Example") do
164
- system 'pod install --silent'
192
+ system 'pod install'
165
193
  system "open './#{@name}.xcworkspace'"
166
194
  end
167
195
  end
@@ -0,0 +1,14 @@
1
+ //
2
+ // <%= @prefixed_module %>CategoryHeader.h
3
+ // <%= @project %>
4
+ //
5
+ // Created by <%= @author %> on <%= @date %>.
6
+ //
7
+ //
8
+
9
+ #ifndef <%= @prefixed_module %>CategoryHeader_h
10
+ #define <%= @prefixed_module %>CategoryHeader_h
11
+
12
+ #import <YKCategoryComponent/YKCategoriesComponentHeader.h>
13
+
14
+ #endif /* <%= @prefixed_module %>CategoryHeader_h */
@@ -0,0 +1,30 @@
1
+ //
2
+ // <%= @prefixed_module %>PrefixHeader.pch
3
+ // <%= @project %>
4
+ //
5
+ // Created by <%= @author %> on <%= @date %>.
6
+ //
7
+ //
8
+
9
+
10
+ #ifndef <%= @prefixed_module %>PrefixHeader_pch
11
+ #define <%= @prefixed_module %>PrefixHeader_pch
12
+
13
+ // Include any system framework and library headers here that should be included in all compilation units.
14
+ // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
15
+
16
+
17
+ #ifdef __OBJC__
18
+ #import <Foundation/Foundation.h>
19
+ #import <UIKit/UIKit.h>
20
+
21
+ #import "<%= @prefixed_module %>CategoryHeader.h"
22
+ #import "<%= @prefixed_module %>VendorHeader.h"
23
+ #import "<%= @prefixed_module %>ToolsHeader.h"
24
+
25
+ #endif
26
+
27
+
28
+
29
+
30
+ #endif /* <%= @prefixed_module %>PrefixHeader_pch */
@@ -15,6 +15,7 @@
15
15
 
16
16
  #import "<%= @prefixed_module %>DemoViewController.h"
17
17
 
18
+ #import <<%= @module %>/<%= @module %>-Swift.h>
18
19
 
19
20
  @implementation <%= @prefixed_module %>RouterRegister
20
21
 
@@ -0,0 +1,13 @@
1
+ //
2
+ // <%= @prefixed_module %>ToolsHeader.h
3
+ // <%= @project %>
4
+ //
5
+ // Created by <%= @author %> on <%= @date %>.
6
+ //
7
+ //
8
+
9
+ #ifndef <%= @prefixed_module %>ToolsHeader_h
10
+ #define <%= @prefixed_module %>ToolsHeader_h
11
+
12
+
13
+ #endif /* <%= @prefixed_module %>ToolsHeader_h */
@@ -0,0 +1,13 @@
1
+ //
2
+ // <%= @prefixed_module %>VendorHeader.h
3
+ // <%= @project %>
4
+ //
5
+ // Created by <%= @author %> on <%= @date %>.
6
+ //
7
+ //
8
+
9
+ #ifndef <%= @prefixed_module %>VendorHeader_h
10
+ #define <%= @prefixed_module %>VendorHeader_h
11
+
12
+
13
+ #endif /* <%= @prefixed_module %>VendorHeader_h */
@@ -0,0 +1,28 @@
1
+
2
+ //
3
+ // <%= @prefixed_module %>RouterDefine.swift
4
+ // <%= @project %>
5
+ //
6
+ // Created by <%= @author %> on <%= @date %>.
7
+ //
8
+ //
9
+
10
+
11
+ import Foundation
12
+
13
+ public struct <%= @prefixed_module %>RouterConstants {
14
+ static let <%= @prefixed_module %>DemoPage = "k<%= @prefixed_module %>DemoPage"
15
+ /// 添加你自己的路由字符串常量 here ...
16
+
17
+ }
18
+
19
+ @objcMembers open class <%= @prefixed_module %>_Swift_RouterDefine: NSObject {
20
+ private override init() {}
21
+
22
+ public class func demoPage() -> String {
23
+ <%= @prefixed_module %>RouterConstants.<%= @prefixed_module %>DemoPage
24
+ }
25
+
26
+ /// 添加你自己的路由定义 here ...
27
+
28
+ }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YkCommand
4
- VERSION = '0.3.0'.freeze
4
+ VERSION = '0.3.3'.freeze
5
5
  end
data/yk_command.gemspec CHANGED
@@ -41,6 +41,11 @@ Gem::Specification.new do |spec|
41
41
  spec.add_development_dependency 'cocoapods'
42
42
  spec.add_development_dependency 'cocoapods-core'
43
43
 
44
+ spec.add_dependency 'bundler'
45
+ spec.add_dependency 'thor'
46
+ spec.add_dependency 'xcodeproj'
47
+ spec.add_dependency 'colored'
48
+
44
49
  # For more information and examples about making a new gem, checkout our
45
50
  # guide at: https://bundler.io/guides/creating_gem.html
46
51
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yk_command
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Major Tom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-01 00:00:00.000000000 Z
11
+ date: 2022-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -122,6 +122,62 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: bundler
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: thor
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: xcodeproj
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: colored
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
125
181
  description: a longer description or delete this line.
126
182
  email:
127
183
  - v2top1@163.com
@@ -147,16 +203,21 @@ files:
147
203
  - bin/yk_command
148
204
  - lib/yk_command.rb
149
205
  - lib/yk_command/commands.rb
206
+ - lib/yk_command/template/objc/CategoryHeader.h
207
+ - lib/yk_command/template/objc/PrefixHeader.pch
150
208
  - lib/yk_command/template/objc/RouterDefine.h
151
209
  - lib/yk_command/template/objc/RouterRegister.h
152
210
  - lib/yk_command/template/objc/RouterRegister.m
153
211
  - lib/yk_command/template/objc/ServiceProtocol.h
154
212
  - lib/yk_command/template/objc/ServiceRegister.h
155
213
  - lib/yk_command/template/objc/ServiceRegister.m
214
+ - lib/yk_command/template/objc/ToolsHeader.h
215
+ - lib/yk_command/template/objc/VendorHeader.h
156
216
  - lib/yk_command/template/objc/demo/DemoViewController.h
157
217
  - lib/yk_command/template/objc/demo/DemoViewController.m
158
218
  - lib/yk_command/template/objc/demo/DemoViewModel.h
159
219
  - lib/yk_command/template/objc/demo/DemoViewModel.m
220
+ - lib/yk_command/template/swift/RouterDefine.swift
160
221
  - lib/yk_command/version.rb
161
222
  - sig/yk_command.rbs
162
223
  - yk_command.gemspec