Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A small command-line tool to quickly tryout a Swift Package Manager package locally

License

NotificationsYou must be signed in to change notification settings

vinhnx/spawn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift 5.0Swift Package Manager@vinhnx

spawn A small command-line tool to quickly tryout a Swift Package Manager (SPM) package locally.

As of Xcode 11, this has been sherlock'ed by Xcode 11 Package support :), as in from Xcode 11 onwards, Xcode will automatically resolve package dependencies and open Xcode project for you, no 3rd party tool needed. But I will keep this tool as learning purpose.

Its job is to check if current repo has anyPackage.swift and resolve dependencies and then open the Xcode for you.

(works withVapor,too)

$ spawnCompleted resolutionin 0.22s📦 ... Everything is already up-to-date🛠 ... generated: ./spawn.xcodeproj📂 ... opening updated Xcode project✅ all done!

NOTE: you might want to close Xcode to have thexed . taking into effect, or choseRevert option from Xcode alert.

Goals

When you want to try out or to edit a SPM package in Xcode, or after adding any new.package under SPM's package manifest file; you need to either runswift package update orswift package generate-xcodeproj and reload Xcode again.

This small wrapper aims to automate that process.

tldr; before:

$ git clone https://github.com/vinhnx/DictionaryNestedSubscript# clone any Swift Package Manager project$cd DictionaryNestedSubscript# change directory to newly cloned repo$ swift package update# update or resolve package dependencies$ swift package generate-xcodeproj# generate a .xcodeproj to edit on Xcode$ xed.# open generated .xcodeproj automatically

after:

$ git clone https://github.com/vinhnx/DictionaryNestedSubscript# clone any Swift Package Manager project$cd DictionaryNestedSubscript# change directory to newly cloned repo$ spawn

TODO: I will be looking at the way to automate cloning from remote repo in the future, for example:

$ spawn https://github.com/vinhnx/DictionaryNestedSubscript# not yet working

Usage

On any Swift package directory, aftergit clone:

$ spawn

Vapor

You can use spawn as replacement for Vapor'svapor xcode -y command

before:

$ vapor xcode -y

after:

$ spawn

Installation

🆕swiftbrew

"A package manager that installs prebuilt Swift command line tool packages, or Homebrew for Swift packages."

$ swift brew install vinhnx/spawn

homebrew

$ brew tap vinhnx/homebrew-formulae$ brew install spawn

or

$ brew install vinhnx/homebrew-formulae/spawn

Mint

$ mint install vinhnx/spawn

Marathon

$ marathon install vinhnx/spawn

Make

$ git clone https://github.com/vinhnx/spawn.git$cd spawn$ make

Swift Package Manager

$ git clone https://github.com/vinhnx/spawn.git$cd spawn$ swift build -c release$ cp -f .build/release/spawn /usr/local/bin/spawn

Related projects

If you like this tool, checkout myvintage, it's a tool to check for any outdated packages.

Combo:

$ vintage&& spawn# vintage: check for any outdated packages, spawn: generate and update packages for you

I hope you like it! :)

Help, feedback or suggestions?

Feel free to contact me onTwitter for discussions, news & announcements & other projects. 🚀

About

A small command-line tool to quickly tryout a Swift Package Manager package locally

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp