@antcook/cli-utils

antcook-cli utils

Usage no npm install needed!

<script type="module">
  import antcookCliUtils from 'https://cdn.skypack.dev/@antcook/cli-utils';
</script>

README

usage

yarn add @antcook/cli-utils
API
  • getPort
  • Incoming init port, then get the port can be used
const { getPort } = require('@antcook/cli-utils')
const canUsePort = getPort(init)
  • getIp
  • Get the current host IP address
const { getIp } = require('@antcook/cli-utils')
const ip = getIp()
  • log
  • Get the current host IP address
const { log } = require('@antcook/cli-utils')
log.fail('fail')				// red log
log.success('success')			// green log
log.warning('warning')			// yellow log