Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnsundell/xgen
A Swift package for generating Xcode workspaces & playgrounds
https://github.com/johnsundell/xgen
generation playground swift xcode xcodeproj
Last synced: 10 days ago
JSON representation
A Swift package for generating Xcode workspaces & playgrounds
- Host: GitHub
- URL: https://github.com/johnsundell/xgen
- Owner: JohnSundell
- License: mit
- Created: 2017-04-09T14:42:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-11-23T17:32:45.000Z (almost 4 years ago)
- Last Synced: 2024-10-14T01:23:55.216Z (23 days ago)
- Topics: generation, playground, swift, xcode, xcodeproj
- Language: Swift
- Homepage:
- Size: 652 KB
- Stars: 191
- Watchers: 8
- Forks: 18
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Easily generate Xcode workspaces & playgrounds from a Swift script or command line tool.
## Usage
Generate workspaces:
```swift
import Xgenlet workspace = Workspace(path: "~/MyWorkspace")
workspace.addProject(at: "~/MyProject.xcodeproj")
try workspace.generate()
```Generate playgrounds:
```swift
import Xgenlet code = "import Foundation\n\n" +
"print(\"Hello world\")"
let playground = Playground(path: "~/MyPlayground", platform: .iOS, code: code)
try playground.generate()
```## Installation
### For scripts
- Install [Marathon](https://github.com/johnsundell/marathon).
- Add Xgen to Marathon using `$ marathon add [email protected]:JohnSundell/Xgen.git`.
- Alternatively, add `[email protected]:JohnSundell/Xgen.git` to your `Marathonfile`.
- Write your script, then run it using `$ marathon run yourScript.swift`.### For command line tools
- Add `.Package(url: "[email protected]:johnsundell/xgen.git", majorVersion: 1)` to your `Package.swift` file.
- Update your packages using `$ swift package update`.## Help, feedback or suggestions?
- [Open an issue](https://github.com/JohnSundell/Xgen/issues/new) if you need help, if you found a bug, or if you want to discuss a feature request.
- [Open a PR](https://github.com/JohnSundell/Xgen/pull/new/master) if you want to make some change to Xgen.
- Contact [@johnsundell on Twitter](https://twitter.com/johnsundell) for discussions, news & announcements about Xgen & other projects.