New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for project additional files #314
Adding support for project additional files #314
Conversation
Generated by π« Danger |
Codecov Report
@@ Coverage Diff @@
## master #314 +/- ##
==========================================
+ Coverage 89.32% 89.47% +0.14%
==========================================
Files 278 280 +2
Lines 10616 10707 +91
==========================================
+ Hits 9483 9580 +97
+ Misses 1133 1127 -6
Continue to review full report at Codecov.
|
case targets | ||
case settings | ||
} | ||
public let additionalFiles: [WorkspaceElement] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still a workspace element?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we'd like to reuse the same type I'd change the name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed - was looking for better names:
Reference
,Element
: too broad?FileReference
,FileElement
: Folder references aren't files :/
Will think some more on suitable alternatives, if you had any please do share :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd stick to the Xcode project's convention, FileElement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π Changes look good to me! It's really nice to see that the work from implementing a better Workspace.swift is coming in handy!
@@ -0,0 +1,3 @@ | |||
import json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π€
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh - can replace this with a different fixture that doesn't look as dubious - the intention was to show case a folder reference to some sever looking code
- Renaming previous internal `FileElement` to `GroupFileElement`
Part of #202
Short description π
Often projects may include additional files or folder references that don't need to be part of any build phase (e.g. design references, documentation etc...)
Solution π¦
Workspace.swift
manifest now supportsadditionalFiles
, the same concept can be added to theProject.swift
manifest with the same rules..glob(pattern: "Documentation/**")
: glob pattern to one or more files.folderReference(path: "Designs")
: single path to a directory that is added as a folder referenceExample:
Implementation π©βπ»π¨βπ»
Project
manifest to includeadditionalFiles
ProjectFileElements
to includeadditionalFiles
Test Plan β
tuist generate
withinfixtures/ios_app_with_custom_workspace/App
Dangerfile.swift
is included in the project but isn't part of the resource phaseDocumentation
files are included (with the appropriate group structure that reflects the file system) and that the files aren't copied to resourcesServer
folder reference is included