diff options
author | XhmikosR <xhmikosr@gmail.com> | 2021-11-30 16:36:01 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2021-12-01 15:19:03 +0300 |
commit | 3121519d230075abc83cf191f6364b9c517a5ef7 (patch) | |
tree | 4b474c94dac9b239903b2c6a0db48348b98a66fc /build | |
parent | 4efad6908421cefbdf4f691f5233d56f182cee1a (diff) |
build: switch to picocolors
Diffstat (limited to 'build')
-rw-r--r-- | build/build-pages.js | 12 | ||||
-rw-r--r-- | build/build-svgs.js | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/build/build-pages.js b/build/build-pages.js index 085d2b415..b851b3aca 100644 --- a/build/build-pages.js +++ b/build/build-pages.js @@ -4,7 +4,7 @@ const fs = require('fs').promises const path = require('path') -const chalk = require('chalk') +const picocolors = require('picocolors') const iconsDir = path.join(__dirname, '../icons/') const pagesDir = path.join(__dirname, '../docs/content/icons/') @@ -31,20 +31,20 @@ tags: await fs.access(pageName, fs.F_OK) if (VERBOSE) { - console.log(`${chalk.cyan(iconBasename)}: Page already exists; skipping`) + console.log(`${picocolors.cyan(iconBasename)}: Page already exists; skipping`) } } catch (_) { await fs.writeFile(pageName, pageTemplate) - console.log(chalk.green(`${iconBasename}: Page created`)) + console.log(picocolors.green(`${iconBasename}: Page created`)) } } (async () => { try { const basename = path.basename(__filename) - const timeLabel = chalk.cyan(`[${basename}] finished`) + const timeLabel = picocolors.cyan(`[${basename}] finished`) - console.log(chalk.cyan(`[${basename}] started`)) + console.log(picocolors.cyan(`[${basename}] started`)) console.time(timeLabel) const files = await fs.readdir(iconsDir) @@ -53,7 +53,7 @@ tags: const filesLength = files.length - console.log(chalk.green('\nSuccess, %s page%s prepared!'), filesLength, filesLength !== 1 ? 's' : '') + console.log(picocolors.green('\nSuccess, %s page%s prepared!'), filesLength, filesLength !== 1 ? 's' : '') console.timeEnd(timeLabel) } catch (error) { console.error(error) diff --git a/build/build-svgs.js b/build/build-svgs.js index ac960c5a8..886af3532 100644 --- a/build/build-svgs.js +++ b/build/build-svgs.js @@ -4,7 +4,7 @@ const fs = require('fs').promises const path = require('path') -const chalk = require('chalk') +const picocolors = require('picocolors') const cheerio = require('cheerio') const { loadConfig, optimize } = require('svgo') @@ -63,9 +63,9 @@ async function processFile(file, config) { (async () => { try { const basename = path.basename(__filename) - const timeLabel = chalk.cyan(`[${basename}] finished`) + const timeLabel = picocolors.cyan(`[${basename}] finished`) - console.log(chalk.cyan(`[${basename}] started`)) + console.log(picocolors.cyan(`[${basename}] started`)) console.time(timeLabel) const files = await fs.readdir(iconsDir) @@ -75,7 +75,7 @@ async function processFile(file, config) { const filesLength = files.length - console.log(chalk.green('\nSuccess, %s icon%s prepared!'), filesLength, filesLength !== 1 ? 's' : '') + console.log(picocolors.green('\nSuccess, %s icon%s prepared!'), filesLength, filesLength !== 1 ? 's' : '') console.timeEnd(timeLabel) } catch (error) { console.error(error) |