🎨 Replace colors module with chalk module

This commit is contained in:
brunosimon
2017-12-26 14:29:00 +01:00
parent 494bd401b9
commit 73bc3e174a
8 changed files with 87 additions and 59 deletions
+5 -4
View File
@@ -6,6 +6,7 @@ const JSZip = require('jszip')
const glob = require('glob')
const fs = require('fs')
const path = require('path')
const chalk = require('chalk')
class Project
{
@@ -50,7 +51,7 @@ class Project
// Debug
if(this.config.debug >= 1)
{
console.log('project > socket'.green.bold + ' - ' + 'connection'.cyan + ' - ' + socket.id.cyan)
console.log(`${chalk.green.bold('project > socket')} - ${chalk.cyan('connection')} - ${chalk.cyan(socket.id)}`)
}
})
}
@@ -63,7 +64,7 @@ class Project
// Debug
if(this.config.debug >= 1)
{
console.log('project > zip'.green.bold + ' - ' + 'from cache'.cyan)
console.log(`${chalk.green.bold('project > zip')} - ${chalk.cyan('from cache')}`)
}
return this.zipBuffer
@@ -96,7 +97,7 @@ class Project
// Debug
if(this.config.debug >= 1)
{
console.log('project > zip'.green.bold + ' - ' + 'create'.cyan)
console.log(`${chalk.green.bold('project > zip')} - ${chalk.cyan('create')}`)
}
return this.zipBuffer
@@ -106,7 +107,7 @@ class Project
*/
addTestContents()
{
console.log('project'.green.bold + ' - ' + 'add test contents'.cyan)
console.log(`${chalk.green.bold('project')} - ${chalk.cyan('add test content')}`)
// Add some with true contents
this.files.createVersion('./test/file.css', `body {