Skip to content

Commit

Permalink
add basic example
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicegginton committed Apr 5, 2021
1 parent bce125d commit a54d474
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PackageDescription
let package = Package(
name: "Spinner",
products: [
.library(name: "Spinner", targets: ["Spinner"]),
.library(name: "Spinner", targets: ["Spinner"])
],
dependencies: [
.package(url: "https://github.com/dominicegginton/Nanoseconds", from: "1.0.0"),
Expand All @@ -14,5 +14,6 @@ let package = Package(
targets: [
.target(name: "Spinner", dependencies: ["Nanoseconds","Rainbow", "Signals"]),
.testTarget(name: "SpinnerTests", dependencies: ["Spinner"]),
.target(name: "Example", dependencies: ["Spinner"])
]
)
7 changes: 7 additions & 0 deletions Sources/Example/main.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Foundation
import Spinner

let mySpinner = Spinner(.dots, "My Spinner", format: "[{D}] {S} - {T}")
mySpinner.start()
sleep(5) // do work
mySpinner.succeed()

0 comments on commit a54d474

Please sign in to comment.