1.1.0 • Published 2 years ago

maki-color v1.1.0

Weekly downloads
2
License
Unlicense
Repository
github
Last release
2 years ago

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

1.1.0

2 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago