@truffle/spinners

CLI spinners singleton

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
Last updated 2 years ago by cliffoo .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @truffle/spinners 
SYNC missed versions from official npm registry.

@truffle/spinners

This is used to manage multiple CLI spinners. It is essentially just a wrapper around the spinnies library that keeps a single instance of the spinnies object in module-level scope.

Usage

Typical example

import { Spinner } from "@truffle/spinners";

const spinner = new Spinner("unique-spinner-name", "watch me spin!");

try {
  await someLongRunningTask();
  spinner.succeed("Phew! 😅");
} catch {
  spinner.fail("Whoops, got too dizzy and fell over! 😵");
}

Hide on completion

import { Spinner } from "@truffle/spinners";

const spinner = new Spinner("unique-spinner-name", "Now you see me");

await someLongRunningTask();
spinner.remove();

Text updates

import { Spinner } from "@truffle/spinners";

const spinner = new Spinner("unique-spinner-name", "Reticulating splines...");

try {
  await reticulateSplines();

  spinner.text = "Perturbing Matrices";
  Promise.all(matrices.map(perturb));

  spinner.text = "Charging Ozone Layer";
  await ozoneLayer.charge();

  spinner.succeed();
} catch {
  spinner.fail("Darn it!");
}

Current Tags

  • 0.2.3-hardhat-error.0                                ...           hardhat-error (2 years ago)
  • 0.2.5                                ...           latest (a year ago)

12 Versions

  • 0.2.5 [deprecated]           ...           a year ago
  • 0.2.4 [deprecated]           ...           2 years ago
  • 0.2.3 [deprecated]           ...           2 years ago
  • 0.2.3-hardhat-error.0 [deprecated]           ...           2 years ago
  • 0.2.2 [deprecated]           ...           2 years ago
  • 0.2.2-hardhat-error.1 [deprecated]           ...           2 years ago
  • 0.2.2-hardhat-error.0 [deprecated]           ...           2 years ago
  • 0.2.1 [deprecated]           ...           2 years ago
  • 0.2.0 [deprecated]           ...           3 years ago
  • 0.1.2 [deprecated]           ...           3 years ago
  • 0.1.1 [deprecated]           ...           3 years ago
  • 0.1.0 [deprecated]           ...           3 years ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (6)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE