-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
602 additions
and
600 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
module.exports = '\x07'; | ||
module.exports = "\x07"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
module.exports = { | ||
screen: '\x1b[2J', | ||
screenLeft: '\x1b[1J', | ||
screenRight: '\x1b[J', | ||
line: '\x1b[2K', | ||
lineLeft: '\x1b[1K', | ||
lineRight: '\x1b[K' | ||
screen: "\x1b[2J", | ||
screenLeft: "\x1b[1J", | ||
screenRight: "\x1b[J", | ||
line: "\x1b[2K", | ||
lineLeft: "\x1b[1K", | ||
lineRight: "\x1b[K" | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
var clc = require('../'); | ||
var clc = require("../"); | ||
|
||
var text = '.........\n' + '. Hello .\n' + '.........\n'; | ||
var text = ".........\n" + ". Hello .\n" + ".........\n"; | ||
var style = { ".": clc.yellowBright("X") }; | ||
|
||
process.stdout.write(clc.art(text, style)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
var clc = require('../'); | ||
var clc = require("../"); | ||
|
||
console.log('Output colored text:'); | ||
console.log(clc.red('Text in red')); | ||
console.log("Output colored text:"); | ||
console.log(clc.red("Text in red")); | ||
|
||
console.log('Styles can be mixed:'); | ||
console.log(clc.red.bgWhite.underline('Underlined red text on white background.')); | ||
console.log("Styles can be mixed:"); | ||
console.log(clc.red.bgWhite.underline("Underlined red text on white background.")); | ||
|
||
console.log('Styled text can be mixed with unstyled:'); | ||
console.log(clc.red('red') + ' plain ' + clc.blue('blue')); | ||
console.log("Styled text can be mixed with unstyled:"); | ||
console.log(clc.red("red") + " plain " + clc.blue("blue")); | ||
|
||
console.log('Styled text can be nested:'); | ||
console.log(clc.red('red ' + clc.blue('blue') + ' red')); | ||
console.log("Styled text can be nested:"); | ||
console.log(clc.red("red " + clc.blue("blue") + " red")); | ||
|
||
console.log('Best way is to predefine needed stylings and then use it:'); | ||
console.log("Best way is to predefine needed stylings and then use it:"); | ||
|
||
var error = clc.red.bold; | ||
var warn = clc.yellow; | ||
var notice = clc.blue; | ||
|
||
console.log(error('Error!')); | ||
console.log(warn('Warning')); | ||
console.log(notice('Notice')); | ||
console.log(error("Error!")); | ||
console.log(warn("Warning")); | ||
console.log(notice("Notice")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
var clc = require('../'); | ||
var clc = require("../"); | ||
|
||
console.log(clc.bold('Bold text')); | ||
console.log(clc.italic('Italic text')); | ||
console.log(clc.underline('Underlined text')); | ||
console.log(clc.blink('Blinking text (might not work for your font)')); | ||
console.log(clc.inverse('Inverse text')); | ||
console.log(clc.strike('Strikethrough text')); | ||
console.log(clc.bold("Bold text")); | ||
console.log(clc.italic("Italic text")); | ||
console.log(clc.underline("Underlined text")); | ||
console.log(clc.blink("Blinking text (might not work for your font)")); | ||
console.log(clc.inverse("Inverse text")); | ||
console.log(clc.strike("Strikethrough text")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
var clc = require('../'); | ||
var clc = require("../"); | ||
|
||
var msg = clc.xterm(202).bgXterm(236); | ||
console.log(msg('Orange text on dark gray background')); | ||
console.log(msg("Orange text on dark gray background")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
var d = require('d'); | ||
var d = require("d"); | ||
|
||
module.exports = Object.defineProperties(require('./bare'), { | ||
windowSize: d(require('./window-size')), | ||
erase: d(require('./erase')), | ||
move: d(require('./move')), | ||
beep: d(require('./beep')), | ||
columns: d(require('./columns')), | ||
strip: d(require('./strip')), | ||
getStrippedLength: d(require('./get-stripped-length')), | ||
slice: d(require('./slice')), | ||
throbber: d(require('./throbber')), | ||
reset: d(require('./reset')), | ||
art: d(require('./art')) | ||
module.exports = Object.defineProperties(require("./bare"), { | ||
windowSize: d(require("./window-size")), | ||
erase: d(require("./erase")), | ||
move: d(require("./move")), | ||
beep: d(require("./beep")), | ||
columns: d(require("./columns")), | ||
strip: d(require("./strip")), | ||
getStrippedLength: d(require("./get-stripped-length")), | ||
slice: d(require("./slice")), | ||
throbber: d(require("./throbber")), | ||
reset: d(require("./reset")), | ||
art: d(require("./art")) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.