mirror of
https://github.com/type-challenges/type-challenges.git
synced 2025-12-08 19:06:13 +00:00
feat: replace picocolors with ansis (#35763)
This commit is contained in:
parent
0514c21cb2
commit
986b79d21a
@ -29,8 +29,8 @@
|
||||
"@types/lz-string": "^1.5.0",
|
||||
"@types/node": "^20.10.5",
|
||||
"@types/prompts": "^2.4.9",
|
||||
"ansis": "^3.12.0",
|
||||
"eslint": "^8.56.0",
|
||||
"picocolors": "^1.0.0",
|
||||
"prompts": "^2.4.2",
|
||||
"typescript": "^5.3.3",
|
||||
"utility-types": "^3.10.0"
|
||||
|
||||
11
pnpm-lock.yaml
generated
11
pnpm-lock.yaml
generated
@ -45,12 +45,12 @@ importers:
|
||||
'@types/prompts':
|
||||
specifier: ^2.4.9
|
||||
version: 2.4.9
|
||||
ansis:
|
||||
specifier: ^3.12.0
|
||||
version: 3.12.0
|
||||
eslint:
|
||||
specifier: ^8.56.0
|
||||
version: 8.56.0
|
||||
picocolors:
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0
|
||||
prompts:
|
||||
specifier: ^2.4.2
|
||||
version: 2.4.2
|
||||
@ -1183,6 +1183,11 @@ packages:
|
||||
color-convert: 2.0.1
|
||||
dev: true
|
||||
|
||||
/ansis@3.12.0:
|
||||
resolution: {integrity: sha512-SxhlInpMkv9QCyI2yHyrhVrTF8dH93M/S86DT5f9brFgr92uJLOCg0RNmtx3YKWKcRmNAaU+gyUfHMdUiqxvFw==}
|
||||
engines: {node: '>=14'}
|
||||
dev: true
|
||||
|
||||
/are-docs-informative@0.0.2:
|
||||
resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==}
|
||||
engines: {node: '>=14'}
|
||||
|
||||
@ -2,7 +2,7 @@ import path from 'node:path'
|
||||
import process from 'node:process'
|
||||
import crypto from 'node:crypto'
|
||||
import fs from 'fs-extra'
|
||||
import c from 'picocolors'
|
||||
import c from 'ansis'
|
||||
import prompts from 'prompts'
|
||||
import { formatToCode } from './actions/utils/formatToCode'
|
||||
import { loadQuizes, resolveInfo } from './loader'
|
||||
@ -96,7 +96,7 @@ async function generatePlayground() {
|
||||
|
||||
let locale = supportedLocales.find(locale => locale === process.argv[2])!
|
||||
|
||||
console.log(c.bold(c.cyan('Generating local playground...\n')))
|
||||
console.log(c.bold.cyan('Generating local playground...\n'))
|
||||
|
||||
let overridableFiles: Snapshot
|
||||
let keepChanges = false
|
||||
@ -104,7 +104,7 @@ async function generatePlayground() {
|
||||
let playgroundSnapshot: Snapshot
|
||||
|
||||
if (process.argv.length === 3 && (process.argv[2] === '--keep-changes' || process.argv[2] === '-K')) {
|
||||
console.log(c.bold(c.cyan('We will keep your changes while generating.\n')))
|
||||
console.log(c.bold.cyan('We will keep your changes while generating.\n'))
|
||||
keepChanges = true
|
||||
|
||||
playgroundSnapshot = await takeSnapshot(playgroundPath)
|
||||
@ -150,7 +150,7 @@ async function generatePlayground() {
|
||||
const code = formatToCode(quiz, locale)
|
||||
|
||||
if (difficulty === undefined || title === undefined) {
|
||||
console.log(c.yellow(`${quiz.no} has no ${locale.toUpperCase()} version. Skipping`))
|
||||
console.log(c.yellow`${quiz.no} has no ${locale.toUpperCase()} version. Skipping`)
|
||||
continue
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ async function generatePlayground() {
|
||||
}))
|
||||
|
||||
console.log()
|
||||
console.log(c.bold(c.green('Local playground generated at: ')) + c.dim(playgroundPath))
|
||||
console.log(c.bold.green('Local playground generated at: ') + c.dim(playgroundPath))
|
||||
console.log()
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user