Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
jihoonahn committed Nov 20, 2023
1 parent a7101f6 commit 59cacd3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,32 @@ additional operations
let workspace = TuistApp().makeModule()
```

### Environment management
EnvironmentObject can manage redundant parts of a project or workspace.

```swift
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.

```swift
struct BaseProject: Module {
@Environment let env = AppEnvironment()

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

## Support later

- tuist 4.0
Expand Down

0 comments on commit 59cacd3

Please sign in to comment.