Comparing version 0.1.0-alpha.3 to 0.1.0
@@ -1,29 +0,16 @@ | ||
var colors = require('colors'); | ||
var chalk = require('chalk'); | ||
var theme = { | ||
"syntax": "grey", | ||
"heading": [ "cyan", "bold" ], | ||
"hr": "grey", | ||
"code": "yellow", | ||
"blockquote": "blue", | ||
"ol": "white", | ||
"ul": "white" | ||
var colorBrushes = { | ||
"syntax": chalk.grey, | ||
"heading": chalk.cyan.bold, | ||
"hr": chalk.grey, | ||
"code": chalk.yellow, | ||
"blockquote": chalk.blue | ||
} | ||
function color(text, type) { | ||
var styles = theme[type] || ''; | ||
if (typeof styles === 'string') { | ||
styles = [ styles ]; | ||
} | ||
styles.forEach(function(style) { | ||
if (style) { | ||
text = text[style]; | ||
} | ||
}); | ||
return text; | ||
var colorBrush = colorBrushes[type] || chalk.stripColor; | ||
return colorBrush(text); | ||
} | ||
module.exports = color; |
{ | ||
"name": "msee", | ||
"version": "0.1.0-alpha.3", | ||
"version": "0.1.0", | ||
"description": "Msee is a command-line tool to read markdown file, and it's a library help your command-line software to output readable markdown content.", | ||
@@ -12,3 +12,3 @@ "main": "./lib/msee.js", | ||
"dependencies": { | ||
"colors": "~0.6.0", | ||
"chalk": "~0.3.0", | ||
"cardinal": "0.3.2", | ||
@@ -15,0 +15,0 @@ "eighty": "0.0.1", |
Msee | ||
=== | ||
Msee is a command-line tool to read markdown file. | ||
*Msee* is a command-line tool to read markdown file. | ||
@@ -13,2 +13,6 @@ And it's a library help your command-line software to output readable markdown content. | ||
## Screenshot | ||
![Msee](./screenshot.png) | ||
## API | ||
@@ -15,0 +19,0 @@ |
73522
8
28
189
+ Addedchalk@~0.3.0
+ Addedansi-styles@0.2.0(transitive)
+ Addedchalk@0.3.0(transitive)
+ Addedhas-color@0.1.7(transitive)
- Removedcolors@~0.6.0
- Removedcolors@0.6.2(transitive)