use nanospinner::{MultiSpinner, Spinner};
use std::io;
use std::thread;
use std::time::Duration;
fn main() {
let handle = Spinner::with_writer("Installing dependencies...", io::stderr()).start();
thread::sleep(Duration::from_secs(2));
handle.success_with("Installed 47 packages.");
thread::sleep(Duration::from_millis(500));
let handle = MultiSpinner::with_writer(io::stderr()).start();
let build = handle.add("Building project...");
let lint = handle.add("Running linter...");
let test = handle.add("Running tests...");
thread::sleep(Duration::from_secs(2));
lint.clear();
build.success();
thread::sleep(Duration::from_secs(1));
test.success_with("42 tests passed.");
handle.stop();
}