ProgressSpinnerKit
A library to display an ActivityIndicator for CLI.
A Work In Progress
ProgressSpinnerKit is still in active development.
Dome
Installation
Swift Package Manager
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "DemoPackage",
dependencies: [
.package(url: "https://github.com/yutailang0119/ProgressSpinnerKit", from: "0.4.0"),
],
targets: [
.target(name: "DemoTarget", dependencies: ["ProgressSpinnerKit"]),
]
)
https://github.com/apple/swift-package-manager
Usege
import TSCBasic
import ProgressSpinnerKit
let spinner = createProgressSpinner(forStream: TSCBasic.stdoutStream, header: " Loading:")
spinner.start()
// Something on the main thread.
spinner.stop()