Giter VIP home page Giter VIP logo

xgen's Introduction

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.

xgen's People

Contributors

johnsundell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xgen's Issues

Generate Project?

Hey @JohnSundell ๐Ÿ‘‹, is the reason why there isn't a Project (.xcodeproj) Generatable because generating project.pbxproj is pretty difficult?

Crashing in Shapeshift - possibly needs updating to newer Files?

When I try to run Shapeshift, it is failing in Xgen:

Fatal error: Error raised at top level: Xgen failed to generate. Underlying error: Failed to create folder: file /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-1103.8.25.8/swift/stdlib/public/core/ErrorType.swift, line 200
[1]    97317 illegal hardware instruction  shapeshift Swifter -icloud

Additionally, when compiling Shapeshift, it reports:

...Shapeshift/.build/checkouts/Files/Sources/Files.swift:596:10: warning: unexpected version number in 'available' attribute for non-specific platform '*'
        @available(*, deprecated: 1.4.0, renamed: "creatingFolderFailed")
         ^                      ~~~~~~~

[4/4] Linking Shapeshift

This leads to me suspect Files is the underlying cause, but I'm uncertain how to update Xgen to use a newer version of Files (or whether indeed that would help to resolve the issue here)

Can't add package

Hi, I can't add xgen using marathofile and add command. When I do marathon add [email protected]:JohnSundell/Xgen.git it's cloning a repository and can't finish. When I add [email protected]:JohnSundell/Xgen.git to marathonfile I'm getting following error:
๐Ÿ’ฅ Failed to update packages
๐Ÿ‘‰ Make sure you have write permissions to the folder '/Users/mk/.marathon/Packages/'
I was adding Files, Unbox, etc. and everything was working except xgen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.