diff --git a/Sources/XcodeTemplateGeneratorLibrary/XcodeTemplates.swift b/Sources/XcodeTemplateGeneratorLibrary/XcodeTemplates.swift index 488a91126..a1bcd7875 100644 --- a/Sources/XcodeTemplateGeneratorLibrary/XcodeTemplates.swift +++ b/Sources/XcodeTemplateGeneratorLibrary/XcodeTemplates.swift @@ -29,9 +29,6 @@ public final class XcodeTemplates { if config.includedTemplates.contains("NodeWithoutView") { templates.append(NodeWithoutViewTemplate(config: config)) } - if config.includedTemplates.contains("Worker") { - templates.append(WorkerTemplate(config: config)) - } if config.includedTemplates.contains("PluginListNode") { templates.append(PluginListNodeTemplate(config: config)) } @@ -44,6 +41,9 @@ public final class XcodeTemplates { if config.includedTemplates.contains("Plugin") { templates.append(PluginTemplate(config: config)) } + if config.includedTemplates.contains("Worker") { + templates.append(WorkerTemplate(config: config)) + } self.templates = templates } diff --git a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Copies.txt b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Copies.txt index 2c06c283f..d6865136a 100644 --- a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Copies.txt +++ b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Copies.txt @@ -29,12 +29,6 @@ ▿ (2 elements) - from: ".bundle/Icons/Tinder@2x.png" - to: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Node (without view).xctemplate/TemplateIcon@2x.png" - ▿ (2 elements) - - from: ".bundle/Icons/Tinder.png" - - to: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Worker.xctemplate/TemplateIcon.png" - ▿ (2 elements) - - from: ".bundle/Icons/Tinder@2x.png" - - to: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Worker.xctemplate/TemplateIcon@2x.png" ▿ (2 elements) - from: ".bundle/Icons/Tinder.png" - to: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Plugin List (for Node).xctemplate/TemplateIcon.png" @@ -59,3 +53,9 @@ ▿ (2 elements) - from: ".bundle/Icons/Tinder@2x.png" - to: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Plugin.xctemplate/TemplateIcon@2x.png" + ▿ (2 elements) + - from: ".bundle/Icons/Tinder.png" + - to: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Worker.xctemplate/TemplateIcon.png" + ▿ (2 elements) + - from: ".bundle/Icons/Tinder@2x.png" + - to: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Worker.xctemplate/TemplateIcon@2x.png" diff --git a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Deletions.txt b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Deletions.txt index c6c6f15fe..706f82571 100644 --- a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Deletions.txt +++ b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Deletions.txt @@ -5,8 +5,8 @@ - "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Node (without view state).xctemplate" - "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/ Node (without view state).xctemplate" - "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Node (without view).xctemplate" - - "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Worker.xctemplate" - "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Plugin List (for Node).xctemplate" - "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Plugin Map (for Node).xctemplate" - "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Plugin (for Node).xctemplate" - "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Plugin.xctemplate" + - "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Worker.xctemplate" diff --git a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Directories.txt b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Directories.txt index 3c40e380c..3279580c0 100644 --- a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Directories.txt +++ b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Directories.txt @@ -14,9 +14,6 @@ ▿ (2 elements) - path: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Node (without view).xctemplate" - createIntermediates: true - ▿ (2 elements) - - path: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Worker.xctemplate" - - createIntermediates: true ▿ (2 elements) - path: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Plugin List (for Node).xctemplate" - createIntermediates: true @@ -29,3 +26,6 @@ ▿ (2 elements) - path: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Plugin.xctemplate" - createIntermediates: true + ▿ (2 elements) + - path: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Worker.xctemplate" + - createIntermediates: true diff --git a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Writes.txt b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Writes.txt index b48f98753..ebca35c09 100644 --- a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Writes.txt +++ b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithIdentifier.Writes.txt @@ -101,12 +101,6 @@ ▿ (2 elements) - .0: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Node (without view).xctemplate/TemplateInfo.plist" - .1: true - ▿ (2 elements) - - .0: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Worker.xctemplate/___FILEBASENAME___Worker.swift" - - .1: true - ▿ (2 elements) - - .0: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Worker.xctemplate/TemplateInfo.plist" - - .1: true ▿ (2 elements) - .0: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Plugin List (for Node).xctemplate/___FILEBASENAME___PluginList.swift" - .1: true @@ -131,3 +125,9 @@ ▿ (2 elements) - .0: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Plugin.xctemplate/TemplateInfo.plist" - .1: true + ▿ (2 elements) + - .0: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Worker.xctemplate/___FILEBASENAME___Worker.swift" + - .1: true + ▿ (2 elements) + - .0: "/Developer/Xcode/Templates/File Templates/Tinder Nodes Architecture Framework (identifier)/Worker.xctemplate/TemplateInfo.plist" + - .1: true diff --git a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Copies.txt b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Copies.txt index 630485b70..322e24c4a 100644 --- a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Copies.txt +++ b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Copies.txt @@ -29,12 +29,6 @@ ▿ (2 elements) - from: ".bundle/Icons/Tinder@2x.png" - to: "/Node (without view).xctemplate/TemplateIcon@2x.png" - ▿ (2 elements) - - from: ".bundle/Icons/Tinder.png" - - to: "/Worker.xctemplate/TemplateIcon.png" - ▿ (2 elements) - - from: ".bundle/Icons/Tinder@2x.png" - - to: "/Worker.xctemplate/TemplateIcon@2x.png" ▿ (2 elements) - from: ".bundle/Icons/Tinder.png" - to: "/Plugin List (for Node).xctemplate/TemplateIcon.png" @@ -59,3 +53,9 @@ ▿ (2 elements) - from: ".bundle/Icons/Tinder@2x.png" - to: "/Plugin.xctemplate/TemplateIcon@2x.png" + ▿ (2 elements) + - from: ".bundle/Icons/Tinder.png" + - to: "/Worker.xctemplate/TemplateIcon.png" + ▿ (2 elements) + - from: ".bundle/Icons/Tinder@2x.png" + - to: "/Worker.xctemplate/TemplateIcon@2x.png" diff --git a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Deletions.txt b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Deletions.txt index d073b53c0..0414ad506 100644 --- a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Deletions.txt +++ b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Deletions.txt @@ -4,8 +4,8 @@ - "/Node (without view state).xctemplate" - "/ Node (without view state).xctemplate" - "/Node (without view).xctemplate" - - "/Worker.xctemplate" - "/Plugin List (for Node).xctemplate" - "/Plugin Map (for Node).xctemplate" - "/Plugin (for Node).xctemplate" - "/Plugin.xctemplate" + - "/Worker.xctemplate" diff --git a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Directories.txt b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Directories.txt index b8c0ccdc0..daaf0f4cf 100644 --- a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Directories.txt +++ b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Directories.txt @@ -14,9 +14,6 @@ ▿ (2 elements) - path: "/Node (without view).xctemplate" - createIntermediates: true - ▿ (2 elements) - - path: "/Worker.xctemplate" - - createIntermediates: true ▿ (2 elements) - path: "/Plugin List (for Node).xctemplate" - createIntermediates: true @@ -29,3 +26,6 @@ ▿ (2 elements) - path: "/Plugin.xctemplate" - createIntermediates: true + ▿ (2 elements) + - path: "/Worker.xctemplate" + - createIntermediates: true diff --git a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Writes.txt b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Writes.txt index 438c9b9c7..6c8232551 100644 --- a/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Writes.txt +++ b/Tests/XcodeTemplateGeneratorLibraryTests/__Snapshots__/XcodeTemplatesTests/testGenerateWithURL.Writes.txt @@ -101,12 +101,6 @@ ▿ (2 elements) - .0: "/Node (without view).xctemplate/TemplateInfo.plist" - .1: true - ▿ (2 elements) - - .0: "/Worker.xctemplate/___FILEBASENAME___Worker.swift" - - .1: true - ▿ (2 elements) - - .0: "/Worker.xctemplate/TemplateInfo.plist" - - .1: true ▿ (2 elements) - .0: "/Plugin List (for Node).xctemplate/___FILEBASENAME___PluginList.swift" - .1: true @@ -131,3 +125,9 @@ ▿ (2 elements) - .0: "/Plugin.xctemplate/TemplateInfo.plist" - .1: true + ▿ (2 elements) + - .0: "/Worker.xctemplate/___FILEBASENAME___Worker.swift" + - .1: true + ▿ (2 elements) + - .0: "/Worker.xctemplate/TemplateInfo.plist" + - .1: true