colorprint
Advanced tools
Comparing version 1.0.7 to 1.1.1
@@ -10,2 +10,3 @@ (function($) { | ||
var activeClassName = opts.prefix+'-active'; | ||
var navbarHeight = $('.navbar').height(); | ||
@@ -17,4 +18,5 @@ var scrollTo = function(e) { | ||
var $el = $(elScrollTo); | ||
var offsetTop = $el.offset().top - navbarHeight; | ||
$('body,html').animate({ scrollTop: $el.offset().top }, 400, 'swing', function() { | ||
$('body,html').animate({ scrollTop: offsetTop }, 400, 'swing', function() { | ||
location.hash = elScrollTo; | ||
@@ -39,4 +41,6 @@ }); | ||
$('li', self).removeClass(activeClassName); | ||
highlighted = $('li:eq('+(i-1)+')', self).addClass(activeClassName); | ||
opts.onHighlight(highlighted); | ||
if (i > 0) { | ||
highlighted = $('li:eq('+(i-1)+')', self).addClass(activeClassName); | ||
opts.onHighlight(highlighted); | ||
} | ||
break; | ||
@@ -43,0 +47,0 @@ } |
@@ -26,9 +26,3 @@ [ | ||
"link": "my_npm_url" | ||
}, | ||
{ | ||
"alt": "Gratipay", | ||
"img": "my_gratipay_budge_url", | ||
"link": "my_gratipay_url" | ||
} | ||
] |
@@ -13,3 +13,2 @@ colorprint | ||
[![npm version][my_npm_budge_url]][my_npm_url] | ||
[![Gratipay][my_gratipay_budge_url]][my_gratipay_url] | ||
@@ -25,18 +24,15 @@ <!-- Badge end --> | ||
- [How to](#01-howto) | ||
- [Usage](#01-howto--usage) | ||
- [Install](#01-howto--install) | ||
- [Usage](#01-howto-usage) | ||
- [Install](#01-howto-install) | ||
- [Using via cli](#02-cli) | ||
- [CLI Usage](#02-cli--c-l-i--usage) | ||
- [Install global for CLI usage.](#02-cli--install-global-for--c-l-i-usage-) | ||
- [CLI Usage](#02-cli-c-l-i--usage) | ||
- [Install global for CLI usage.](#02-cli-install-global-for--c-l-i-usage-) | ||
- [Customizing](#03-customizing) | ||
- [Customize the whole module.](#03-customizing--customize-the-whole-module-) | ||
- [Create new context to customize.](#03-customizing--create-new-context-to-customize-) | ||
- [Customize the whole module.](#03-customizing-customize-the-whole-module-) | ||
- [Create new context to customize.](#03-customizing-create-new-context-to-customize-) | ||
- [Links](#09-links) | ||
- [Website](#09-links--website) | ||
- [Documents](#09-links--documents) | ||
- [Reports](#09-links--reports) | ||
- [Website](#09-links-website) | ||
- [Documents](#09-links-documents) | ||
- [Reports](#09-links-reports) | ||
- [License](#10-license) | ||
- [About this project](#11-project) | ||
- [Author](#11-project--author) | ||
- [Donation](#11-project--donation) | ||
@@ -52,3 +48,3 @@ <!-- Table end --> | ||
<a name="01-howto--usage"></a> | ||
<a name="01-howto-usage"></a> | ||
### Usage | ||
@@ -58,2 +54,3 @@ | ||
var colorpint = require('colorpint'); | ||
colorpint.notice('This is NOTICE'); //Pipe to stdout with magenta color. | ||
colorpint.info('This is INFO'); //Pipe to stdout with green color. | ||
@@ -69,3 +66,3 @@ colorpint.debug('This is DEBUG'); //Pipe to stdout with color. | ||
<a name="01-howto--install"></a> | ||
<a name="01-howto-install"></a> | ||
### Install | ||
@@ -81,3 +78,3 @@ | ||
<a name="02-cli--c-l-i--usage"></a> | ||
<a name="02-cli-c-l-i--usage"></a> | ||
### CLI Usage | ||
@@ -88,2 +85,3 @@ | ||
colorpint notice "This is NOTICE from CLI" # Pipe to stdout with magenta color. | ||
colorpint info "This is INFO from CLI" # Pipe to stdout with green color. | ||
@@ -101,3 +99,3 @@ colorpint debug "This is DEBUG from CLI" # Pipe to stdout with color. | ||
<a name="02-cli--install-global-for--c-l-i-usage-"></a> | ||
<a name="02-cli-install-global-for--c-l-i-usage-"></a> | ||
### Install global for CLI usage. | ||
@@ -113,3 +111,3 @@ | ||
<a name="03-customizing--customize-the-whole-module-"></a> | ||
<a name="03-customizing-customize-the-whole-module-"></a> | ||
### Customize the whole module. | ||
@@ -125,3 +123,3 @@ | ||
<a name="03-customizing--create-new-context-to-customize-"></a> | ||
<a name="03-customizing-create-new-context-to-customize-"></a> | ||
### Create new context to customize. | ||
@@ -146,3 +144,3 @@ | ||
<a name="09-links--website"></a> | ||
<a name="09-links-website"></a> | ||
### Website | ||
@@ -155,3 +153,3 @@ | ||
<a name="09-links--documents"></a> | ||
<a name="09-links-documents"></a> | ||
### Documents | ||
@@ -161,3 +159,3 @@ | ||
<a name="09-links--reports"></a> | ||
<a name="09-links-reports"></a> | ||
### Reports | ||
@@ -175,21 +173,3 @@ | ||
<a name="11-project"></a> | ||
About this project | ||
-------- | ||
[![Bitdeli Badge][my_bitdeli_badge_url]][bitdeli_url] | ||
<a name="11-project--author"></a> | ||
### Author | ||
+ [Taka Okunishi](http://okunishitaka.com) | ||
<a name="11-project--donation"></a> | ||
### Donation | ||
Support this project and [others by okunishinishi][my_gratipay_url] via [gratipay][my_gratipay_url]. | ||
[<img src="https://cdn.rawgit.com/gratipay/gratipay-badge/2.3.0/dist/gratipay.svg" alt="Support via Gratipay"/>][my_gratipay_url] | ||
<!-- Sections end --> | ||
@@ -196,0 +176,0 @@ |
{ | ||
"NOTICE": { | ||
"color": "magenta", | ||
"error": false | ||
}, | ||
"INFO": { | ||
@@ -3,0 +7,0 @@ "color": "green", |
@@ -34,2 +34,4 @@ /** | ||
}, | ||
/** Color for notice print. */ | ||
NOTICE_COLOR: 'magenta', | ||
/** Color for info print. */ | ||
@@ -45,2 +47,7 @@ INFO_COLOR: 'green', | ||
FATAL_COLOR: 'bgRed', | ||
/** Alias for module:colorprint/lib~Colorprint#notice. */ | ||
NOTICE: function () { | ||
var s = this; | ||
s.notice.apply(s, arguments); | ||
}, | ||
/** Alias for module:colorprint/lib~Colorprint#info. */ | ||
@@ -81,2 +88,10 @@ INFO: function () { | ||
/** | ||
* Print notice message. | ||
* @param {...string} msg - Message to print. | ||
*/ | ||
notice: function (msg) { | ||
var s = this; | ||
s._printLog(s._format.apply(s, arguments), s.NOTICE_COLOR); | ||
}, | ||
/** | ||
* Print info message. | ||
@@ -83,0 +98,0 @@ * @param {...string} msg - Message to print. |
/** | ||
* @overview Print ansi-colored message to stdout/stderr. | ||
* @version 1.0.6 | ||
* @version 1.1.0 | ||
* @module colorprint | ||
* @author {@link http://okunishitaka.com|Taka Okunishi} | ||
* @license {@link MIT|https://github.com/okunishinishi/node-colorprint/blob/master/LICENSE} | ||
* @borrows module:colorprint/lib~Colorprint#NOTICE_COLOR as NOTICE_COLOR | ||
* @borrows module:colorprint/lib~Colorprint#INFO_COLOR as INFO_COLOR | ||
@@ -12,2 +13,3 @@ * @borrows module:colorprint/lib~Colorprint#DEBUG_COLOR as DEBUG_COLOR | ||
* @borrows module:colorprint/lib~Colorprint#FATAL_COLOR as FATAL_COLOR | ||
* @borrows module:colorprint/lib~Colorprint#NOTICE as NOTICE | ||
* @borrows module:colorprint/lib~Colorprint#INFO as INFO | ||
@@ -21,2 +23,3 @@ * @borrows module:colorprint/lib~Colorprint#DEBUG as DEBUG | ||
* @borrows module:colorprint/lib~Colorprint#SUFFIX as SUFFIX | ||
* @borrows module:colorprint/lib~Colorprint#notice as notice | ||
* @borrows module:colorprint/lib~Colorprint#info as info | ||
@@ -38,3 +41,3 @@ * @borrows module:colorprint/lib~Colorprint#debug as debug | ||
var colorprint = new Colorprint(); | ||
colorprint.version = '1.0.6'; | ||
colorprint.version = '1.1.0'; | ||
@@ -41,0 +44,0 @@ |
{ | ||
"name": "colorprint", | ||
"version": "1.0.7", | ||
"version": "1.1.1", | ||
"description": "Print ansi-colored message to stdout/stderr.", | ||
@@ -42,8 +42,7 @@ "main": "lib", | ||
"devDependencies": { | ||
"coz": "^1.0.24", | ||
"apiguide": "^1.0.6", | ||
"codeclimate-test-reporter": "0.1.0", | ||
"coz": "^1.2.5", | ||
"istanbul": "^0.3.17", | ||
"nodeunit": "^0.9.1", | ||
"codeclimate-test-reporter": "0.1.0", | ||
"ink-docstrap": "^0.4.12", | ||
"istanbul": "^0.3.14", | ||
"jsdoc": "^3.3.0", | ||
"taggit": "^1.0.3", | ||
@@ -50,0 +49,0 @@ "versionup": "^1.0.7" |
@@ -13,3 +13,2 @@ colorprint | ||
[![npm version][my_npm_budge_url]][my_npm_url] | ||
[![Gratipay][my_gratipay_budge_url]][my_gratipay_url] | ||
@@ -25,18 +24,15 @@ <!-- Badge end --> | ||
- [How to](#01-howto) | ||
- [Usage](#01-howto--usage) | ||
- [Install](#01-howto--install) | ||
- [Usage](#01-howto-usage) | ||
- [Install](#01-howto-install) | ||
- [Using via cli](#02-cli) | ||
- [CLI Usage](#02-cli--c-l-i--usage) | ||
- [Install global for CLI usage.](#02-cli--install-global-for--c-l-i-usage-) | ||
- [CLI Usage](#02-cli-c-l-i--usage) | ||
- [Install global for CLI usage.](#02-cli-install-global-for--c-l-i-usage-) | ||
- [Customizing](#03-customizing) | ||
- [Customize the whole module.](#03-customizing--customize-the-whole-module-) | ||
- [Create new context to customize.](#03-customizing--create-new-context-to-customize-) | ||
- [Customize the whole module.](#03-customizing-customize-the-whole-module-) | ||
- [Create new context to customize.](#03-customizing-create-new-context-to-customize-) | ||
- [Links](#09-links) | ||
- [Website](#09-links--website) | ||
- [Documents](#09-links--documents) | ||
- [Reports](#09-links--reports) | ||
- [Website](#09-links-website) | ||
- [Documents](#09-links-documents) | ||
- [Reports](#09-links-reports) | ||
- [License](#10-license) | ||
- [About this project](#11-project) | ||
- [Author](#11-project--author) | ||
- [Donation](#11-project--donation) | ||
@@ -52,3 +48,3 @@ <!-- Table end --> | ||
<a name="01-howto--usage"></a> | ||
<a name="01-howto-usage"></a> | ||
### Usage | ||
@@ -58,2 +54,3 @@ | ||
var colorpint = require('colorpint'); | ||
colorpint.notice('This is NOTICE'); //Pipe to stdout with magenta color. | ||
colorpint.info('This is INFO'); //Pipe to stdout with green color. | ||
@@ -69,3 +66,3 @@ colorpint.debug('This is DEBUG'); //Pipe to stdout with color. | ||
<a name="01-howto--install"></a> | ||
<a name="01-howto-install"></a> | ||
### Install | ||
@@ -81,3 +78,3 @@ | ||
<a name="02-cli--c-l-i--usage"></a> | ||
<a name="02-cli-c-l-i--usage"></a> | ||
### CLI Usage | ||
@@ -88,2 +85,3 @@ | ||
colorpint notice "This is NOTICE from CLI" # Pipe to stdout with magenta color. | ||
colorpint info "This is INFO from CLI" # Pipe to stdout with green color. | ||
@@ -101,3 +99,3 @@ colorpint debug "This is DEBUG from CLI" # Pipe to stdout with color. | ||
<a name="02-cli--install-global-for--c-l-i-usage-"></a> | ||
<a name="02-cli-install-global-for--c-l-i-usage-"></a> | ||
### Install global for CLI usage. | ||
@@ -113,3 +111,3 @@ | ||
<a name="03-customizing--customize-the-whole-module-"></a> | ||
<a name="03-customizing-customize-the-whole-module-"></a> | ||
### Customize the whole module. | ||
@@ -125,3 +123,3 @@ | ||
<a name="03-customizing--create-new-context-to-customize-"></a> | ||
<a name="03-customizing-create-new-context-to-customize-"></a> | ||
### Create new context to customize. | ||
@@ -146,3 +144,3 @@ | ||
<a name="09-links--website"></a> | ||
<a name="09-links-website"></a> | ||
### Website | ||
@@ -155,3 +153,3 @@ | ||
<a name="09-links--documents"></a> | ||
<a name="09-links-documents"></a> | ||
### Documents | ||
@@ -161,3 +159,3 @@ | ||
<a name="09-links--reports"></a> | ||
<a name="09-links-reports"></a> | ||
### Reports | ||
@@ -175,21 +173,3 @@ | ||
<a name="11-project"></a> | ||
About this project | ||
-------- | ||
[![Bitdeli Badge][my_bitdeli_badge_url]][bitdeli_url] | ||
<a name="11-project--author"></a> | ||
### Author | ||
+ [Taka Okunishi](http://okunishitaka.com) | ||
<a name="11-project--donation"></a> | ||
### Donation | ||
Support this project and [others by okunishinishi][my_gratipay_url] via [gratipay][my_gratipay_url]. | ||
[<img src="https://cdn.rawgit.com/gratipay/gratipay-badge/2.3.0/dist/gratipay.svg" alt="Support via Gratipay"/>][my_gratipay_url] | ||
<!-- Sections end --> | ||
@@ -196,0 +176,0 @@ |
@@ -16,2 +16,3 @@ /** | ||
exports['Print.'] = function (test) { | ||
_spawn(bin, ['notice', 'This is notice', 'from cli.']); | ||
_spawn(bin, ['info', 'This is info', 'from cli.']); | ||
@@ -18,0 +19,0 @@ _spawn(bin, ['debug', 'This is debug', 'from cli.']); |
@@ -10,2 +10,3 @@ /** | ||
var colorprint = new Colorprint({}); | ||
colorprint.notice('This is notice'); | ||
colorprint.info('This is info'); | ||
@@ -29,3 +30,3 @@ colorprint.debug('This is debug'); | ||
SUFFIX: 'That\'s it!', | ||
INFO_COLOR:'blue' | ||
INFO_COLOR: 'blue' | ||
}); | ||
@@ -32,0 +33,0 @@ colorprint.info('This will be blue with prefix.'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3800392
7
110
135213
193