Skip to content

Commit

Permalink
Fix issue with file template generator removing spaces after update t…
Browse files Browse the repository at this point in the history
…o stencil 0.15.1 (tuist#5344)
  • Loading branch information
bogren authored Aug 9, 2023
1 parent 56e5d74 commit 2c5b68d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/TuistGenerator/Templates/FilesTemplate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello world!
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ extension Project {
targets: [mainTarget],
resourceSynthesizers: [
.strings(plugin: "LocalPlugin"),
.files(extensions: ["txt"]),
.custom(
name: "Lottie",
parser: .json,
Expand Down

0 comments on commit 2c5b68d

Please sign in to comment.