Skip to content

jihoonahn/tuistui

Repository files navigation

TuistUI

GitHub

TuistUI is Style Plugin for cooler use of Tuist.

Installation

In order to tell Tuist you'd like to use TuistUI 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/tuistui", tag: "vTAG")
    ]
)

Documentation

The documentation for releases and main are available here:

Using

Then import the TuistUI from thr location you want to use.

import TuistUI

Creating Project with TuistUI

struct BaseFeature: Module {
    var body: some Module {
        Project {
            /// Target Code
        }
        .organizationName("")
        .package {
            /// Package Code
        }
    }    
}

additional operations

let project = BaseFeature().module()

Creating Workspace with TuistUI

struct TuistApp: Module {
    var body: some Module {
        Workspace {
            Path.relativeToRoot("Projects/App")
        }
        .scheme {
            /// Scheme Code
        }
    }
}

additional operations

let workspace = TuistApp().module()

Environment management

EnvironmentObject can manage redundant parts of a project or workspace.

final class AppEnvironment: EnvironmentObject {
    let organizationName: String = ""
    let deploymentTarget: DeploymentTarget = .iOS(targetVersion: "15.0", devices: [.iphone, .ipad])
    let platform: Platform = .iOS
}

How to use within a module.

struct BaseProject: Module {
    @ModuleEnvironment var env = AppEnvironment()

    var body: Module {
        Project {
            // Target
        }
        .organizationName(env.organizationName)
    }
}

Templates

$ tuist scaffold $(templateName) --path $(path) --name $(name)
Template Name
  • project
  • workspace

Support later

  • tuistui macro support later

License

tuistui is under MIT license. See the LICENSE file for more info.