UNPKG

@re-dev/react-truncate

Version:

Provides `Truncate`, `MiddleTruncate` and `ShowMore` React components for truncating multi-line spans and adding an ellipsis.

101 lines 2.9 kB
{ "name": "@re-dev/react-truncate", "version": "0.5.1", "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", "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", "gen:changelog": "pnpm exec changelog", "gen:release": "pnpm exec release", "test": "vitest", "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/changelog": "^0.3.0", "@bassist/commit": "^0.1.1", "@bassist/eslint-config": "^0.1.2", "@bassist/node-utils": "^0.4.1", "@bassist/release": "^0.2.0", "@bassist/tsconfig": "^0.1.1", "@testing-library/dom": "^10.4.0", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", "@testing-library/user-event": "^14.6.1", "@types/node": "^20.17.16", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@types/react-is": "^19.0.0", "@types/sinon": "^17.0.3", "@vitest/coverage-v8": "^3.0.4", "conventional-changelog-cli": "^4.1.0", "cross-env": "^7.0.3", "eslint": "^9.22.0", "happy-dom": "^16.7.3", "husky": "^9.1.7", "lint-staged": "^15.4.3", "npm-run-all2": "^7.0.2", "prettier": "^3.5.3", "react": "^19.0.0", "react-dom": "^19.0.0", "react-is": "^19.0.0", "sinon": "^19.0.2", "tsup": "^8.3.6", "tsx": "^4.19.2", "typescript": "^5.7.3", "vitest": "^3.0.4" }, "lint-staged": { "*.{js,jsx,vue,ts,tsx}": [ "prettier --write", "eslint --fix" ] } }