Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/icons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2021-11-30 16:36:01 +0300
committerXhmikosR <xhmikosr@gmail.com>2021-12-01 15:19:03 +0300
commit3121519d230075abc83cf191f6364b9c517a5ef7 (patch)
tree4b474c94dac9b239903b2c6a0db48348b98a66fc
parent4efad6908421cefbdf4f691f5233d56f182cee1a (diff)
build: switch to picocolors
-rw-r--r--build/build-pages.js12
-rw-r--r--build/build-svgs.js8
-rw-r--r--package-lock.json2
-rw-r--r--package.json3
4 files changed, 12 insertions, 13 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)
diff --git a/package-lock.json b/package-lock.json
index e24088743..eca7ec9eb 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,7 +10,6 @@
"license": "MIT",
"devDependencies": {
"autoprefixer": "^10.4.0",
- "chalk": "^4.1.2",
"cheerio": "^1.0.0-rc.10",
"cross-env": "^7.0.3",
"eslint": "^8.3.0",
@@ -20,6 +19,7 @@
"linkinator": "^2.16.2",
"lockfile-lint": "^4.6.2",
"npm-run-all": "^4.1.5",
+ "picocolors": "^1.0.0",
"postcss": "^8.4.4",
"postcss-cli": "^9.0.2",
"purgecss": "^4.1.3",
diff --git a/package.json b/package.json
index 0133cdac6..53db7900a 100644
--- a/package.json
+++ b/package.json
@@ -37,10 +37,8 @@
"test:vnu": "node build/vnu-jar.js",
"test": "npm-run-all docs-build --parallel --aggregate-output --continue-on-error test:*"
},
- "dependencies": {},
"devDependencies": {
"autoprefixer": "^10.4.0",
- "chalk": "^4.1.2",
"cheerio": "^1.0.0-rc.10",
"cross-env": "^7.0.3",
"eslint": "^8.3.0",
@@ -50,6 +48,7 @@
"linkinator": "^2.16.2",
"lockfile-lint": "^4.6.2",
"npm-run-all": "^4.1.5",
+ "picocolors": "^1.0.0",
"postcss": "^8.4.4",
"postcss-cli": "^9.0.2",
"purgecss": "^4.1.3",