maki-color

1.1.0 • Public • Published

Maki Color Scripts

Install scripts for colored output

⚠️ This package was written on and for Mac OS. If you would like to contribute a comprehensive update for Windows or other platform, please welcome!

Install

npx maki-color install ./path/to/scripts

This installs the following scripts at path/to/scripts:

color.js
color.sh

Requirements

  • Mac OS
  • Node >= 8
  • NPM >= 5.3

Usage

Shell scripts:

#!/bin/bash
# test.sh

source ./path/to/scripts/color.sh

color_init

color "${BLUE}Script is processing"
color "${YELLOW}Be careful of user input!"
color "${RED}Error!"
color "${GREEN}Script completed successfully."

JS scripts:

// test.js

const { color, colorInit } = require('./path/to/scripts/color.js'):

colorInit();

color`{BLUE}Script is processing`;
color`{YELLOW}Be careful of user input!`;
color`{RED}Error!`;
color`{GREEN}Script completed successfully.`;

Screenshot0

Configuration

Set the $COLOR_ORIGIN environment variable to turn off the file origin trace:

export COLOR_ORIGIN=false

Screenshot with no origin trace

Links

Package Sidebar

Install

npm i maki-color

Weekly Downloads

2

Version

1.1.0

License

Unlicense

Unpacked Size

44.1 kB

Total Files

11

Last publish

Collaborators

  • underblob