UNPKG

npm-reinstall

Version:
21 lines (20 loc) 761 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var chalk_1 = __importDefault(require("chalk")); var os_1 = require("os"); var cyan = chalk_1.default.cyan, yellow = chalk_1.default.yellow; /** * Display notice message about fallbacking to `npm` when command doesn't exist. * * @export * @param {string} command */ function noticeFallback(command) { var commandText = yellow(command); var noticeText = cyan("\"" + commandText + "\" command does not exist. Fallback to npm." + os_1.EOL); process.stdout.write(noticeText); } exports.default = noticeFallback;