update term color render

This commit is contained in:
2026-02-06 22:38:46 +08:00
parent 99577f2482
commit 4329da08cb
7 changed files with 315 additions and 137 deletions

View File

@@ -1,12 +1,51 @@
{
"name": "@hatterjiang/term-color-render",
"version": "1.0.1",
"version": "1.0.2",
"description": "Render color for term use syntax like [red]text[/red]",
"license": "MIT",
"author": "hatterjiang",
"type": "commonjs",
"main": "index.ts",
"author": "Hatter Jiang",
"type": "module",
"main": "./dist/cjs/index.js",
"module": "./dist/mjs/index.js",
"types": "./dist/types/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/types/index.d.ts",
"default": "./dist/mjs/index.js"
},
"require": {
"types": "./dist/types/index.d.ts",
"default": "./dist/cjs/index.js"
}
}
},
"repository": {
"type": "git",
"url": "https://git.hatter.ink/hatter/term-color-render.git"
},
"keywords": [
"terminal",
"term",
"color"
],
"files": [
"dist/**/*",
"README.md",
"LICENSE"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"prebuild": "rm -rf dist",
"build": "npm run build:mjs && npm run build:cjs && npm run build:types",
"build:mjs": "tsc --module ESNext --outDir dist/mjs --moduleSuffixes .mjs",
"build:cjs": "tsc --module CommonJS --outDir dist/cjs --moduleSuffixes .cjs",
"build:types": "tsc --emitDeclarationOnly --outDir dist/types",
"lint": "eslint src --ext .ts",
"test": "jest",
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@types/node": "^25.2.1",
"typescript": "^5.9.3"
}
}