Swiftpack.co - JohnSundell/Xgen as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by JohnSundell.
JohnSundell/Xgen 2.2.0
A Swift package for generating Xcode workspaces & playgrounds
⭐️ 191
🕓 3 years ago
.package(url: "https://github.com/JohnSundell/Xgen.git", from: "2.2.0")

Xgen

Easily generate Xcode workspaces & playgrounds from a Swift script or command line tool.

Usage

Generate workspaces:

import Xgen

let workspace = Workspace(path: "~/MyWorkspace")
workspace.addProject(at: "~/MyProject.xcodeproj")
try workspace.generate()

Generate playgrounds:

import Xgen

let 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.
  • 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 if you need help, if you found a bug, or if you want to discuss a feature request.
  • Open a PR if you want to make some change to Xgen.
  • Contact @johnsundell on Twitter for discussions, news & announcements about Xgen & other projects.

GitHub

link
Stars: 191
Last commit: 3 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Xgen 2.2.0
5 years ago

This release makes it possible to add auxiliary source files to a playground generated with Xgen.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics