# Download repo
git clone https://github.com/edudo-inc/spmgen.git
# Navigate to repo directory
cd spmgen
# Build and install using Make
make install
# You can also delete spmgen using `make uninstall` command
Resources command
SPMGen provides static resource factories for various resource types.
Add a script to your Run Script target build phases
spmgen resources "$SRCROOT/Sources/<#Project#>Resources/Resources" \
--output "$SRCROOT/Sources/<#Project#>Resources/SPMGen.swift" \
--indentor " " \
--indentation-width 2
# You can also add `--disable-exports` flag to disable `@_exported` attribute
# for `import SPMResources` declaration in generated file
Add <#Project#>Resources target as a dependency to other targets
SPMGen
Code generator for Swift.
Installation
Homebrew
Makefile
Resources command
SPMGen provides static resource factories for various resource types.
Supported resources:
.xcassets.ttf.otf.xcassets.xib.storyboard.scnassets/.scnIntegration
Add SPMGen dependency to your package
Create
<#Project#>Resourcestarget with a following structureSpecify resource processing and add SPMResources dependency to your target
Add a script to your
Run Scripttarget build phasesAdd
<#Project#>Resourcestarget as a dependency to other targetsUsage
Import your
<#Project#>Resourcespackage and initialize objects using.resource()static factoryCasePaths command
Generate CasePaths for all enums in your project using following command