@@ -26,15 +26,12 @@ func registerModuleDependency() {
2626 registerModulePaths ( )
2727 makeProjectDirectory ( )
2828 registerXCConfig ( )
29- registerMicroTarget ( target: . sources)
3029 var targetString = " [ "
3130 if hasInterface {
32- registerMicroTarget ( target: . interface)
3331 makeScaffold ( target: . interface)
3432 targetString += " . \( MicroTargetType . interface) , "
3533 }
3634 if hasTesting {
37- registerMicroTarget ( target: . testing)
3835 makeScaffold ( target: . testing)
3936 targetString += " . \( MicroTargetType . testing) , "
4037 }
@@ -61,27 +58,12 @@ func registerModuleDependency() {
6158func registerModulePaths( ) {
6259 updateFileContent (
6360 filePath: currentPath + " Plugin/DependencyPlugin/ProjectDescriptionHelpers/ModulePaths.swift " ,
64- finding: " enum \( layer. rawValue) : String { \n " ,
61+ finding: " enum \( layer. rawValue) : String, MicroTargetPathConvertable { \n " ,
6562 inserting: " case \( moduleName) \n "
6663 )
6764 print ( " Register \( moduleName) to ModulePaths.swift " )
6865}
6966
70- func registerMicroTarget( target: MicroTargetType ) {
71- let targetString = """
72- static let \( moduleName) \( target. rawValue) = TargetDependency.project(
73- target: ModulePaths. \( layer. rawValue) . \( moduleName) .targetName(type: . \( target) ),
74- path: .relativeTo \( layer. rawValue) (ModulePaths. \( layer. rawValue) . \( moduleName) .rawValue)
75- ) \n
76- """
77- updateFileContent (
78- filePath: currentPath + " Plugin/DependencyPlugin/ProjectDescriptionHelpers/Dependency+Target.swift " ,
79- finding: " public extension TargetDependency. \( layer. rawValue) { \n " ,
80- inserting: targetString
81- )
82- print ( " Register \( moduleName) \( target. rawValue) target to Dependency+Target.swift " )
83- }
84-
8567func registerXCConfig( ) {
8668 makeDirectory ( path: currentPath + " XCConfig/ \( moduleName) " )
8769 let xcconfigContent = " #include \" ../Shared.xcconfig \" "
@@ -220,18 +202,19 @@ print("This module has a 'Demo' Target? (y\\n, default = n)", terminator: " : ")
220202let hasDemo = readLine ( ) ? . lowercased ( ) == " y "
221203
222204print ( " " )
205+ print ( """
206+ ------------------------------------------------------------------------------------------------------------------------
207+ Layer: \( layer. rawValue)
208+ Module name: \( moduleName)
209+ interface: \( hasInterface) , testing: \( hasTesting) , unitTests: \( hasUnitTests) , uiTests: \( hasUITests) , demo: \( hasDemo)
210+ ------------------------------------------------------------------------------------------------------------------------
211+ """ )
212+ print ( " 🔄 Module is creating ... " )
223213
224214registerModuleDependency ( )
225215
226- print ( " " )
227- print ( " ------------------------------------------------------------------------------------------------------------------------ " )
228- print ( " Layer: \( layer. rawValue) " )
229- print ( " Module name: \( moduleName) " )
230- print ( " interface: \( hasInterface) , testing: \( hasTesting) , unitTests: \( hasUnitTests) , uiTests: \( hasUITests) , demo: \( hasDemo) " )
231- print ( " ------------------------------------------------------------------------------------------------------------------------ " )
232216print ( " ✅ Module is created successfully! " )
233217
234-
235218// MARK: - Bash
236219protocol CommandExecuting {
237220 func run( commandName: String , arguments: [ String ] ) throws -> String
0 commit comments