@re-dev/react-truncate
Version:
Provides `Truncate`, `MiddleTruncate` and `ShowMore` React components for truncating multi-line spans and adding an ellipsis.
115 lines • 3.62 kB
JSON
{
"name": "@re-dev/react-truncate",
"version": "0.6.0",
"description": "Provides `Truncate`, `MiddleTruncate` and `ShowMore` React components for truncating multi-line spans and adding an ellipsis.",
"author": "chengpeiquan <chengpeiquan@chengpeiquan.com>",
"license": "MIT",
"homepage": "https://truncate.js.org",
"type": "module",
"packageManager": "pnpm@10.15.1",
"files": [
"dist"
],
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"browser": "./dist/index.js",
"unpkg": "./dist/index.js",
"jsdelivr": "./dist/index.js",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"scripts": {
"dev": "pnpm -F docs dev",
"build": "run-s build:*",
"build:lib": "tsup",
"build:docs": "pnpm -F docs build",
"build:docs:e2e": "run-s build:lib build:docs",
"gen:changelog": "pnpm exec changelog",
"gen:release": "pnpm exec release",
"test": "vitest",
"test:run": "vitest run",
"test:e2e": "playwright test",
"test:e2e:docs": "playwright test --config playwright.docs.config.ts",
"test:e2e:docs:preview": "cross-env SKIP_DOCS_E2E_BUILD=1 playwright test --config playwright.docs.config.ts",
"test:e2e:ui": "playwright test --ui",
"smoke:prepare": "node ./smoke/scripts/prepare-smoke-package.mjs",
"test:smoke": "playwright test --config smoke/playwright.config.ts",
"coverage": "vitest run --coverage",
"lint": "eslint src",
"lint:inspector": "npx @eslint/config-inspector",
"format": "prettier --write .",
"up": "npx taze minor -r -f -w -i",
"backup": "git add . && git commit -m \"chore: backup\" && git push",
"prepare": "husky install"
},
"repository": {
"type": "git",
"url": "https://github.com/remanufacturing/react-truncate"
},
"keywords": [
"react",
"truncate",
"react-truncate",
"react-show-more",
"react-show-more-text",
"ellipsis",
"multiline"
],
"peerDependencies": {
"react": ">=19.0.0 || >=18.0.0 || >=17.0.0 || >=16.0.0",
"react-dom": ">=19.0.0 || >=18.0.0 || >=17.0.0 || >=16.0.0"
},
"devDependencies": {
"@bassist/build-config": "^0.1.0",
"@bassist/changelog": "^0.3.0",
"@bassist/eslint-config": "^0.3.0",
"@bassist/node-utils": "^0.5.0",
"@bassist/release": "^0.3.1",
"@bassist/tsconfig": "^0.1.1",
"@commitlint/cli": "^19.8.1",
"@commitlint/config-conventional": "^19.8.1",
"@playwright/test": "^1.54.2",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.7.0",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/node": "^24.3.0",
"@types/react": "^19.1.10",
"@types/react-dom": "^19.1.7",
"@types/react-is": "^19.0.0",
"@vitejs/plugin-react": "^4.3.4",
"@types/sinon": "^17.0.4",
"@vitest/coverage-v8": "^3.2.4",
"conventional-changelog-cli": "^4.1.0",
"cross-env": "^7.0.3",
"eslint": "^9.33.0",
"happy-dom": "^18.0.1",
"husky": "^9.1.7",
"lint-staged": "^16.1.5",
"npm-run-all2": "^7.0.2",
"prettier": "^3.6.2",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"react-is": "^19.1.1",
"sinon": "^21.0.0",
"tsup": "^8.5.0",
"tsx": "^4.20.4",
"typescript": "^5.9.2",
"vite": "^5.4.14",
"vitest": "^3.2.4"
},
"lint-staged": {
"*.{js,jsx,vue,ts,tsx}": [
"prettier --write",
"eslint --fix"
]
}
}