This repository was archived by the owner on Jan 27, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +111
-48
lines changed
Expand file tree Collapse file tree 3 files changed +111
-48
lines changed Original file line number Diff line number Diff line change 44
55
66const colors = require ( 'colors' ) ;
7+ const logger = require ( 'hexo-log' ) ( ) ;
78
89/**
9- * Print log
10- * @param {... String } argvs Strings to print
10+ * Print error
11+ * @param {String } content Strings to print
1112 * @return {undefined }
1213 */
13- function log ( ... argvs ) {
14+ function error ( content ) {
1415
15- console . log ( `${ colors . green ( 'hexo-helper-live2d' . toUpperCase ( ) ) } : ${ argvs } ` ) ;
16+ logger . error ( `${ colors . green ( 'hexo-helper-live2d' . toUpperCase ( ) ) } : ${ content } ` ) ;
1617
1718}
1819
1920/**
20- * Print warn
21- * @param {... String } argvs Strings to print
21+ * Print log
22+ * @param {String } content Strings to print
2223 * @return {undefined }
2324 */
24- function warn ( ... argvs ) {
25+ function log ( content ) {
2526
26- console . log ( `${ colors . yellow ( 'hexo-helper-live2d' . toUpperCase ( ) ) } : ${ argvs } ` ) ;
27+ logger . info ( `${ 'hexo-helper-live2d' . toUpperCase ( ) . inverse } : ${ content } ` ) ;
2728
2829}
2930
3031/**
31- * Print error
32- * @param {... String } argvs Strings to print
32+ * Print warn
33+ * @param {String } content Strings to print
3334 * @return {undefined }
3435 */
35- function error ( ... argvs ) {
36+ function warn ( content ) {
3637
37- console . log ( `${ colors . red ( 'hexo-helper-live2d' . toUpperCase ( ) ) } : ${ argvs } ` ) ;
38+ logger . info ( `${ 'hexo-helper-live2d' . toUpperCase ( ) . inverse } : ${ content } ` ) ;
3839
3940}
4041
Original file line number Diff line number Diff line change 66 "devDependencies" : {
77 "commitizen" : " ^2.9.6" ,
88 "cz-conventional-changelog" : " ^2.1.0" ,
9- "eslint" : " ^4.19.0 " ,
9+ "eslint" : " ^4.19.1 " ,
1010 "live2d-widget-model-wanko" : " ^1.0.5"
1111 },
1212 "dependencies" : {
1313 "colors" : " ^1.2.1" ,
1414 "hexo-fs" : " ^0.2.2" ,
15+ "hexo-log" : " ^0.2.0" ,
1516 "live2d-widget" : " ^3.0.5" ,
1617 "lodash" : " ^4.17.5" ,
1718 "path" : " ^0.12.7"
You can’t perform that action at this time.
0 commit comments