anesis 0.10.1

CLI for scaffolding projects from remote templates and extending them with project addons
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::time::Duration;

use indicatif::{ProgressBar, ProgressStyle};

pub fn spinner(msg: impl Into<String>) -> ProgressBar {
  let pb = ProgressBar::new_spinner();
  pb.set_style(
    ProgressStyle::with_template("{spinner:.cyan} {msg}")
      .unwrap()
      .tick_strings(&["", "", "", "", "", "", "", "", "", ""]),
  );
  pb.set_message(msg.into());
  pb.enable_steady_tick(Duration::from_millis(80));
  pb
}