🎨 Replace colors module with chalk module
This commit is contained in:
+9
-8
@@ -6,6 +6,7 @@ const socketIoClient = require('socket.io-client')
|
||||
const opener = require('opener')
|
||||
const nodeNotifier = require('node-notifier')
|
||||
const path = require('path')
|
||||
const chalk = require('chalk')
|
||||
|
||||
/**
|
||||
* Watcher class
|
||||
@@ -49,7 +50,7 @@ class Watcher
|
||||
// Debug
|
||||
if(this.config.debug)
|
||||
{
|
||||
console.log('watcher > socket'.green.bold + ' - ' + 'connect'.cyan)
|
||||
console.log(`${chalk.green.bold('watcher > socket')} - ${chalk.cyan('connect')}`)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -59,7 +60,7 @@ class Watcher
|
||||
// Debug
|
||||
if(this.config.debug)
|
||||
{
|
||||
console.log('watcher > socket'.green.bold + ' - ' + 'disconnect'.cyan)
|
||||
console.log(`${chalk.green.bold('watcher > socket')} - ${chalk.cyan('disconnect')}`)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -127,7 +128,7 @@ class Watcher
|
||||
|
||||
if(this.config.debug >= 1)
|
||||
{
|
||||
console.log('watcher'.green.bold + ' - ' + 'start watching'.cyan + ' - ' + this.path.cyan)
|
||||
console.log(`${chalk.green.bold('watcher')} - ${chalk.cyan('start watching')} - ${chalk.cyan(this.path)}`)
|
||||
}
|
||||
|
||||
// Add event
|
||||
@@ -172,7 +173,7 @@ class Watcher
|
||||
// Debug
|
||||
if(this.config.debug >= 1)
|
||||
{
|
||||
console.log('watcher'.green.bold + ' - ' + 'add'.cyan + ' - ' + relativePath.cyan)
|
||||
console.log(`${chalk.green.bold('watcher')} - ${chalk.cyan('add')} - ${chalk.cyan(relativePath)}`)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -218,7 +219,7 @@ class Watcher
|
||||
// Debug
|
||||
if(this.config.debug >= 1)
|
||||
{
|
||||
console.log('watcher'.green.bold + ' - ' + 'change'.cyan + ' - ' + relativePath.cyan)
|
||||
console.log(`${chalk.green.bold('watcher')} - ${chalk.cyan('change')} - ${chalk.cyan(relativePath)}`)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -234,7 +235,7 @@ class Watcher
|
||||
// Debug
|
||||
if(this.config.debug >= 1)
|
||||
{
|
||||
console.log('watcher'.green.bold + ' - ' + 'unlink'.cyan + ' - ' + relativePath.cyan)
|
||||
console.log(`${chalk.green.bold('watcher')} - ${chalk.cyan('unlink')} - ${chalk.cyan(relativePath)}`)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -250,7 +251,7 @@ class Watcher
|
||||
// Debug
|
||||
if(this.config.debug >= 1)
|
||||
{
|
||||
console.log('watcher'.green.bold + ' - ' + 'addDir'.cyan + ' - ' + relativePath.cyan)
|
||||
console.log(`${chalk.green.bold('watcher')} - ${chalk.cyan('addDir')} - ${chalk.cyan(relativePath)}`)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -266,7 +267,7 @@ class Watcher
|
||||
// Debug
|
||||
if(this.config.debug >= 1)
|
||||
{
|
||||
console.log('watcher'.green.bold + ' - ' + 'unlinkDir'.cyan + ' - ' + relativePath.cyan)
|
||||
console.log(`${chalk.green.bold('watcher')} - ${chalk.cyan('unlinkDir')} - ${chalk.cyan(relativePath)}`)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user