Skip to content

runway-org/tuist-module-plugin

Repository files navigation

Tuist Module Plugin

This repo serves as a plugin to the excellent Tuist Xcode project generator. The plugin adds functionality to easily create a module structure for your repository. Check out the Runway blog for an introduction to Tuist and the structure of modules, and the followup blog post on how to build and publish a Tuist plugin using SPM and version control.

Getting Started

Using this plugin from Tuist is straightforward. In your Config.swift file add this entry:

let config = Config(
    plugins: [
        .git(url: "https://github.com/runway-org/tuist-module-plugin", tag: "1.0.0")
    ]
)

Inside of your ProjectDescriptionHelpers you can declare modules like this:

import Foundation
import ProjectDescription
import ModuleDescription

extension Module {
    public static var sampleApp: Module {
        .init(name: .sampleApp, config: appConfig)
    }
}

extension ModuleName {
    public static var sampleApp: ModuleName = "App"
}

private let appConfig = Module.Config(
    dependencies: [
        // Your other modules
    ],
    product: .custom(.app),
    testConfig: Module.TestConfig(hasResources: false)
)

From there the Project.swift becomes much simpler:

import ProjectDescription
import ProjectDescriptionHelpers
import ModuleDescription

let project = Project(
    bundleID: bundleBaseID,
    modules: [
        .sampleApp,
        // Your other modules
    ]
)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages