diff --git a/Sources/TuistGenerator/Templates/FilesTemplate.swift b/Sources/TuistGenerator/Templates/FilesTemplate.swift index 6b7e010004b..7be29808355 100644 --- a/Sources/TuistGenerator/Templates/FilesTemplate.swift +++ b/Sources/TuistGenerator/Templates/FilesTemplate.swift @@ -25,8 +25,8 @@ extension SynthesizedResourceInterfaceTemplates { {% endfor %} {% endmacro %} {% macro fileBlock file %} - /// {% if file.path and param.preservePath %}{{file.path}}/{% endif %}{{file.name}}{% if file.ext %}.{{file.ext}}{% endif %} - {% set identifier %}{{ file.name }}{% if useExt %}.{{ file.ext }}{% endif %}{% endset %} + /// {%+ if file.path and param.preservePath %}{{file.path}}/{% endif %}{{file.name}}{% if file.ext %}.{{file.ext}}{% endif %} + {% set identifier %}{{ file.name }}{% if useExt %}.{{ file.ext }}{% endif %}{% endset +%} {{accessModifier}} static let {{identifier|swiftIdentifier:"pretty"|lowerFirstWord|escapeReservedKeywords}} = {{resourceType}}(name: "{{file.name}}", ext: {% if file.ext %}"{{file.ext}}"{% else %}nil{% endif %}, relativePath: "{{file.path if param.preservePath}}", mimeType: "{{file.mimeType}}") {% endmacro %} {% macro dirBlock directory parent %} diff --git a/projects/tuist/fixtures/app_with_plugins/Resources/File.txt b/projects/tuist/fixtures/app_with_plugins/Resources/File.txt new file mode 100644 index 00000000000..6769dd60bdf --- /dev/null +++ b/projects/tuist/fixtures/app_with_plugins/Resources/File.txt @@ -0,0 +1 @@ +Hello world! \ No newline at end of file diff --git a/projects/tuist/fixtures/app_with_plugins/Tuist/ProjectDescriptionHelpers/Project+Templates.swift b/projects/tuist/fixtures/app_with_plugins/Tuist/ProjectDescriptionHelpers/Project+Templates.swift index 05ad44ed2f6..39ceb9800e5 100644 --- a/projects/tuist/fixtures/app_with_plugins/Tuist/ProjectDescriptionHelpers/Project+Templates.swift +++ b/projects/tuist/fixtures/app_with_plugins/Tuist/ProjectDescriptionHelpers/Project+Templates.swift @@ -28,6 +28,7 @@ extension Project { targets: [mainTarget], resourceSynthesizers: [ .strings(plugin: "LocalPlugin"), + .files(extensions: ["txt"]), .custom( name: "Lottie", parser: .json,