Configuration Tuist plugin available in Tuist.
In order to tell Tuist you'd like to use Configuration plugin in your project follow the instructions that are described in Tuist documentation.
Add the plugin to Config.swift
.
import ProjectDescription
let config = Config(
plugins: [
.git(url: "https://github.com/jihoonahn/configuration", tag: "vTAG")
]
)
The documentation for releases and main
are available here:
Then import the Configuration
from thr location you want to use.
import Configuration
It inherits the ConfigurationType
and brings together common configuration types in one place.
enum AppConfiguration: String, ConfigurationsType {
case dev
case prod
var path: Path {
...
}
}
And create a configuration in Configuration Values
.
extension ConfigurationValues {
var `default`: [ProjectDescription.Configuration] {
ConfigurationGroup {
Debug(AppConfiguration.dev)
Release(AppConfiguration.prod)
}
}
}
You can import and use the configuration using keypath where you want to use it.
@Configurations(\.default) var configuration
configuration is under MIT license. See the LICENSE file for more info.