33const options = require ( './options' )
44const fs = require ( 'fs' )
55const extend = require ( 'extend' )
6- const colors = require ( 'colors/safe ' )
6+ const { cyan , red , bold } = require ( 'colorette ' )
77
88module . exports = function ( program , server ) {
99 const start = program
@@ -29,7 +29,7 @@ module.exports = function (program, server) {
2929 fs . readFile ( configFile , ( err , file ) => {
3030 // No file exists, not a problem
3131 if ( err ) {
32- console . log ( colors . cyan . bold ( 'TIP' ) , 'create a config.json: `$ solid init`' )
32+ console . log ( cyan ( bold ( 'TIP' ) ) , 'create a config.json: `$ solid init`' )
3333 } else {
3434 // Use flags with priority over config file
3535 const config = JSON . parse ( file )
@@ -123,17 +123,17 @@ function bin (argv, server) {
123123 } catch ( e ) {
124124 if ( e . code === 'EACCES' ) {
125125 if ( e . syscall === 'mkdir' ) {
126- console . log ( colors . red . bold ( 'ERROR' ) , `You need permissions to create '${ e . path } ' folder` )
126+ console . log ( red ( bold ( 'ERROR' ) ) , `You need permissions to create '${ e . path } ' folder` )
127127 } else {
128- console . log ( colors . red . bold ( 'ERROR' ) , 'You need root privileges to start on this port' )
128+ console . log ( red ( bold ( 'ERROR' ) ) , 'You need root privileges to start on this port' )
129129 }
130130 return 1
131131 }
132132 if ( e . code === 'EADDRINUSE' ) {
133- console . log ( colors . red . bold ( 'ERROR' ) , 'The port ' + argv . port + ' is already in use' )
133+ console . log ( red ( bold ( 'ERROR' ) ) , 'The port ' + argv . port + ' is already in use' )
134134 return 1
135135 }
136- console . log ( colors . red . bold ( 'ERROR' ) , e . message )
136+ console . log ( red ( bold ( 'ERROR' ) ) , e . message )
137137 return 1
138138 }
139139 app . listen ( argv . port , function ( ) {
0 commit comments