1.1.4 • Published 4 years ago

try-exec v1.1.4

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Install

npm install -D try-exec

# or

yarn add --dev try-exec

Usage

const tryExec = require('try-exec')
const isReachable = require('is-reachable')

tryExec({
  script: 'gatsby develop',
  // Check if API is reachable
  check: async () => await isReachable('cdn.contentful.com'),
})

API

tryExec(?options)

Options

max

Max attemps to check

type: Number

default: 3

interval

Delay between each attemp

type: Number (ms)

default: 1500

script

CLI script to run

type: String

default: echo "Hello World"

check

(Async) function to run when checking

type: Function

default: () => false

verbose

Log when attemps, number of each iteration and results. Could be passed a string to log.

type: Boolean|String

default: false

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago