yk_command 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f34e6ae09ebe81539a0aa8a77ef53681e21ed61265d9ad55807baa56f29bd36
4
- data.tar.gz: a70182d88c78b4f381ccef78916b78072e38cb2a78c75fcac978a73efc1e3b73
3
+ metadata.gz: 0534ee698e59925308e98f7ac12bf52f290e728e6a84a0ac91ff4a5370e2f54e
4
+ data.tar.gz: 7c6be77ef2a76cd5f325c9a118b7bb9a39b861feee9ec1e7fc5c34cb62a7b52d
5
5
  SHA512:
6
- metadata.gz: ad4c7410b1a14a1edde3ec8fd52cd2a4552075c16d1b17bb77fa2071934353c2a80ab723105a76ce38a81487b241deb5e6327b0e3f483c63207187453806f782
7
- data.tar.gz: d5448d59b97d07b5c30ce1ffc9dd7bd2d7c0f07bc9dd68143e2090386b1d13a60ad31a4953cc77cbaa778d526980d2b2e9035a17aea605daf82619e0e6354c37
6
+ metadata.gz: cd5f4ceb625d07193ab6fb5d378124e58286dd66ca1b0e378dfc38d99f6f7a20548830ac2463e3b3e24f302dc125407c74d14a8d4b215c5f2a1f7fa7f2f16939
7
+ data.tar.gz: f62b4dd8f623b87b10f44aa8b0a7df2ed924e2fb9f37f880faf7666d6ffe0ce65254225bb6b2617fca8b417cee3643eb57387a0b29acc85465e2317a80642b20
@@ -1,5 +1,5 @@
1
1
  ---
2
- :project: SYTHomeModule
2
+ :project: MerchanHome
3
3
  :language: objc
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" />
@@ -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
 
@@ -149,11 +143,35 @@ module YkCommand
149
143
  template source, final_file
150
144
  end
151
145
 
146
+ private_folder_path = "#{@final_path}/#{@name}/Classes/Private"
147
+ #pch file
148
+ # pch_file_name = "PrefixHeader.pch"
149
+ # final_file = "#{private_folder_path}/#{@prefixed_module}#{pch_file_name}"
150
+ # source = "#{__dir__}/template/objc/#{pch_file_name}"
151
+ # template source, final_file
152
+
153
+ private_level_folder_files = {
154
+ 'PrefixHeader.pch' => 'Business',
155
+ 'CategoryHeader.h' => 'Category',
156
+ 'ToolsHeader.h' => 'Tools',
157
+ 'vendorHeader.h' => 'Vendor'
158
+ }
159
+
160
+ private_level_folder_files.each do |file_name, folder|
161
+ final_prefix = @prefixed_module
162
+ if file_name == 'PrefixHeader.pch'
163
+ final_prefix = @module
164
+ end
165
+
166
+ final_file = "#{private_folder_path}/#{folder}/#{final_prefix}#{file_name}"
167
+ source = "#{__dir__}/template/objc/#{file_name}"
168
+ template source, final_file
169
+ end
152
170
 
153
171
  business_demo_path = "#{@final_path}/#{@name}/Classes/Private/Business"
154
172
  demo_replace_file = ['DemoViewController.h','DemoViewController.m','DemoViewModel.h','DemoViewModel.m']
155
173
  demo_replace_file.each do |file_name|
156
- final_file = "#{business_demo_path}/#{@prefixed_module}#{file_name}"
174
+ final_file = "#{business_demo_path}/Demo/#{@prefixed_module}#{file_name}"
157
175
  source = "#{__dir__}/template/objc/demo/#{file_name}"
158
176
  template source, final_file
159
177
  end
@@ -161,7 +179,7 @@ module YkCommand
161
179
 
162
180
 
163
181
  Dir.chdir("#{@final_path}/Example") do
164
- system 'pod install --silent'
182
+ system 'pod install'
165
183
  system "open './#{@name}.xcworkspace'"
166
184
  end
167
185
  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 */
@@ -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 */
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YkCommand
4
- VERSION = '0.3.1'.freeze
4
+ VERSION = '0.3.2'.freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yk_command
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Major Tom
@@ -203,12 +203,16 @@ files:
203
203
  - bin/yk_command
204
204
  - lib/yk_command.rb
205
205
  - lib/yk_command/commands.rb
206
+ - lib/yk_command/template/objc/CategoryHeader.h
207
+ - lib/yk_command/template/objc/PrefixHeader.pch
206
208
  - lib/yk_command/template/objc/RouterDefine.h
207
209
  - lib/yk_command/template/objc/RouterRegister.h
208
210
  - lib/yk_command/template/objc/RouterRegister.m
209
211
  - lib/yk_command/template/objc/ServiceProtocol.h
210
212
  - lib/yk_command/template/objc/ServiceRegister.h
211
213
  - lib/yk_command/template/objc/ServiceRegister.m
214
+ - lib/yk_command/template/objc/ToolsHeader.h
215
+ - lib/yk_command/template/objc/VendorHeader.h
212
216
  - lib/yk_command/template/objc/demo/DemoViewController.h
213
217
  - lib/yk_command/template/objc/demo/DemoViewController.m
214
218
  - lib/yk_command/template/objc/demo/DemoViewModel.h