8000 GitHub - reuters-graphics/clack
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

reuters-graphics/clack

Repository files navigation

@reuters-graphics/clack

Additional prompts and specifically styled ones we use with clack at Reuters Graphics.

Installation

pnpm install @reuters-graphics/clack

Demo

Open in StackBlitz

Prompts

datetime

import { datetime } from '@reuters-graphics/clack';

const date = await datetime({
  message: 'Pick a date and time',
  initialValue: new Date(),
  validate: (value) => {
    if (value.getTime() < new Date().getTime()) {
      return 'Date must be in the future';
    }
  },
});

intro

import { intro } from '@reuters-graphics/clack';

intro('My CLI');

note

import { note } from '@reuters-graphics/clack';

note('My message', 'title');

spinner

A spinner that runs for at least a number of milliseconds.

import { spinner } from '@reuters-graphics/clack';

const s = spinner(1000);
s.start('Building');
// ...
await s.end('🏁 Built')
5FFA
;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
0