目录
目录README.md

PLCommand

SPM Swift License Platform

﹥: Running Command from Swift

Installation

PLCommand was deployed as Swift Package Manager. Package to install in a project. Add as a dependent item within the swift manifest.

let package = Package(
    ...
    dependencies: [
        .package(url: "https://github.com/Pelagornis/PLCommand.git", from: "1.0.1")
    ],
    ...
)

Then import the PLCommand from thr location you want to use.

import PLCommand

Documentation

The documentation for releases and main are available here:

Using

If you want to use Bash.

let bash = PLCommand.Bash
bash.run("{command}")

Or if you want to use zsh.

let zsh = PLCommand.ZSH
zsh.run("{command}")

Frequently Used Commands

PLCommand supports frequently used features.

Git

PLCommand.Git.`init`()
PLCommand.Git.add()
PLCommand.Git.clone(repositoryURL)
PLCommand.Git.commit("comment")
PLCommand.Git.push()
PLCommand.Git.pull(remote: "origin")
PLCommand.Git.checkout(branch: "gh-page")

Swift Package Manager

PLCommand.SwiftPackage.create()
PLCommand.SwiftPackage.create(type: .executable)
PLCommand.SwiftPackage.update()
PLCommand.SwiftPackage.generateXcodeproj()
PLCommand.SwiftPackage.build()
PLCommand.SwiftPackage.test()

PLCommand will provide more functionality in the future.

Extension

PLCommand is easier to scale.

extension PLCommand {
    static let Swift = PLCommand.Alias(executableURL: "/usr/bin/swift")
}

PLCommand.Swift.run("{command}")

License

PLCommand is under MIT license. See the LICENSE file for more info.

关于
416.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号