How to use meow - 10 common examples

To help you get started, we’ve selected a few meow examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github maticzav / emma-cli / packages / create-emma / src / bin.tsx View on Github external
import { render, Instance } from 'ink'
import meow from 'meow'
import mls from 'multilines'
import ora from 'ora'
import updateNotifier from 'update-notifier'
import prompts from 'prompts'

import { IStarter } from './algolia'
import Emma from './Emma'
import { getDistDirectory, getStarterTemplateRepo } from './installer'
import { drawBox } from './structure'
import { mkdirSync } from 'fs'

/* Spec */

const cli = meow(
  mls`
  | Usage
  |  $ create-emma <dir>
  `,
)

/**
 * Make sure that user is on the latest version
 * avaiable in case they have connection to NPM.
 */

const notifier = updateNotifier(cli)

notifier.notify()

if (notifier.update) {</dir>
github flow-typed / flow-typed / definitions / npm / meow_v3.x.x / test_meow_v3.x.x.js View on Github external
import meow from 'meow';

const cliBasic = meow('Do stuff');

const cli = meow(`
  Usage
      $ foo <input>

    Options
      -r, --rainbow  Include a rainbow

    Examples
      $ foo unicorns --rainbow
      🌈 unicorns 🌈
`, {
  alias: {
    r: 'rainbow'
  }
});
github ewnd9 / dictionary-cli / src / cli.js View on Github external
import meow from 'meow';
import chalk from 'chalk';

const cli = meow({
  pkg: './../package.json',
  help: [
    'Usage',
    '  dictionary   <input>',
    '',
    '  # if input match /[a-zA-Z]/ it will translate from english to , otherwise from  to english',
    '  dictionary --en= <input>',
    '  # if input match /[а-яА-Я]/ it will translate from russian to , otherwise from  to russian',
    '  dictionary --ru= <input>',
    '',
    '  dictionary  --export',
    '  dictionary  --export &gt; history.txt'
  ]
});

const print = console.log.bind(console);
github tusharmath / Multi-threaded-downloader / src / bin / mtd.js View on Github external
'validOptions$'
  )
  O.merge(
    validOptions$.take(1).map(msg => [msg, LogAlways('\nStarting...')]),
    size$.map(msg => [msg, R.compose(Log, Status)]),
    invalidOptions$.map(msg => [msg, LogAlways(Help)]),
    completion$.map(msg => [msg, BAR])
  ).subscribe(
    ([msg, action]) => action(msg),
    R.partial(LogError, ['Failure']),
    R.partial(Log, ['Complete'])
  )
}

const [validOptions$, invalidOptions$] = ValidOptions(
  O.just(meow(Help).flags).shareReplay(1)
)
const [new$, resume$] = DownloadOptions(validOptions$)
const created$ = FlatMapShare(CreateMTDFile, new$).takeLast(1)
const mtdFile$ = O.merge(
  resume$,
  Rx.sample([new$], created$).map(R.head)
).pluck('mtdPath')
const downloaded$ = FlatMapShare(DownloadFromMTDFile, mtdFile$)
const [{fdR$, meta$}] = demux(downloaded$, 'meta$', 'fdR$')
const finalized$ = FlatMapShare(
  FinalizeDownload,
  Rx.sample([fdR$, meta$], downloaded$.last())
    .map(([fd, meta]) => ({fd$: O.just(fd), meta$: O.just(meta)}))
    .last()
)
const completion$ = Completion(meta$.throttle(1000))
github itgalaxy / generate-robotstxt / src / cli.js View on Github external
#!/usr/bin/env node

import path from "path";
import fs from "fs-extra";
import meow from "meow";
import resolveFrom from "resolve-from";
import standalone from "./standalone";

const cli = meow(
  `
    Usage generate-robotstxt [options] 

    Options:
       --config  Path to a specific configuration file.
`,
  {
    flags: {
      config: {
        type: "string"
      }
    }
  }
);

const optionsBase = {};
github onderceylan / pwa-asset-generator / src / cli.ts View on Github external
import meow from 'meow';
import preLogger from './helpers/logger';
import { generateImages } from './main';
import constants from './config/constants';

const cli = meow(
  `
$ pwa-asset-generator --help

  Usage
    $ pwa-asset-generator [source] [output-folder]

    The assets will be saved to the folder where the command is executed if no output-folder provided.

  Options
    -b --background             Page background to use when image source is provided: css value  [default: transparent]
    -o --opaque                 Shows white as canvas background and generates images without transparency  [default: true]
    -p --padding                Padding to use when image source provided: css value  [default: "10%"]
    -s --scrape                 Scraping Apple Human Interface guidelines to fetch splash screen specs  [default: true]
    -m --manifest               Web app manifest file path to automatically update manifest file with the generated icons
    -i --index                  Index HTML file path to automatically put splash screen and icon meta tags in
    -a --path                   Path prefix to prepend for href links generated for meta tags
github camwiegert / playlists / lib / cli.js View on Github external
import { getPlaylists, getTracks } from './playlists';
import { writeJson } from 'fs-extra';
import { resolve } from 'path';
import meow from 'meow';
import ora from 'ora';

const cli = meow(`
Usage
  $ spotify-playlist-archive 
github modulz / radix / packages / generate-icon-lib / src / cli.ts View on Github external
async function main() {
  await prechecks();
  const cli = meow(
    `
	Usage
	  $ ${path.basename(process.argv[1])} --file=

	Options
	  --file, -f    File Key from Figma
	  --help        Show this message

	Examples
	  $ ${path.basename(process.argv[1])} --file=EEggMA9IV81CYzCSI8LFEUOY
`,
    {
      hardRejection: false,
      flags: {
        file: {
          type: 'string',
github patternplate / patternplate / packages / cli / source / binary / patternplate.js View on Github external
import ora from "ora";
import { omitBy, isNull } from "lodash";

import patternplate from "../";
import patternplateInit from "../library/init/index.js";

const defaults = {
  open: null,
  "log.level": "info",
  "log.colorize": null,
  "log.timestamp": null,
  "log.showLevel": null,
  "server.autoPort": null
};

const cli = meow(
  `
	Usage
	$ patternplate [command=start] [options]

	Commands
	  start   - start a patternplate instance in cwd
	  console - execute a task in patternplate console
	  init    - initialize a patternplate project in cwd
	  help    - show this help

	Global Options (patternplate [=start, console, init])
	  env                  - set the runtime environment [=development, production]
	  log.level            - log level [silly, =debug, info, warn, error]
	  log.colorize         - enable/disable colored log output [=true, false]
	  log.timestamp        - enable/disable timestamp on log output [=true, false]
	  log.showLevel        - enable/disable level stamp on log outpu [=true, false]
github felipemfp / passando-na-tv / src / index.js View on Github external
#!/usr/bin/env node

import meow from 'meow'
import updateNotifier from 'update-notifier'
import pkg from '../package.json'
import PassandoNaTvCli from './passandoNaTv'

const notifier = updateNotifier({pkg})
notifier.notify()

const cli = meow(`
  Como usar
    $ passando-na-tv [canal]

  Opções
    --filmes, -f          Apenas canais de filmes
    --series, -s          Apenas canais de séries
    --esportes, -e        Apenas canais de esportes
    --infantil, -i        Apenas canais infantis
    --documentarios, -d   Apenas canais de documentários
    --noticias, -n        Apenas canais de notícias
    --abertos, -a         Apenas canais abertos
    --entretenimento, -t  Apenas canais de entretenimento
    --help, -h            Apresentar ajuda

  Exemplos
    $ passando-na-tv --filmes

meow

CLI app helper

MIT
Latest version published 10 months ago

Package Health Score

79 / 100
Full package analysis

Popular meow functions