Skip to content

Instantly share code, notes, and snippets.

@brian-mann
Created March 26, 2016 16:48
Show Gist options
  • Select an option

  • Save brian-mann/e734fab6366bd783059f to your computer and use it in GitHub Desktop.

Select an option

Save brian-mann/e734fab6366bd783059f to your computer and use it in GitHub Desktop.
fun deprecation warning
chalk = require("chalk")
asciify = require("asciify")
asteriks = Array(90).join("*")
log = {
newLine: (num = 1) ->
n = Array(num).join("\n")
console.log(n)
}
["red", "yellow", "cyan", "blue"].forEach (color) ->
log[color] = (msg) ->
console.log chalk[color](msg)
display = (err, res) ->
log.red(asteriks)
log.newLine()
log.red(res)
log.newLine()
log.yellow("This package has been renamed to: #{chalk.cyan("cypress-cli")}")
log.newLine()
log.yellow("Please update your scripts to: #{chalk.cyan("npm install -g cypress-cli")}")
log.newLine(2)
log.yellow("You can read more about this change and the upcoming open source release:")
log.cyan("https://on.cypress.io/warnings#cypress-package-deprecation")
log.newLine()
log.red(asteriks)
log.newLine()
asciify("warning", {font: "starwars"}, display)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment