use-element-fit
Version:
useElementFit is a React hook that allows you to measure and element's based on certain restraints, similar to object-fit in CSS.
89 lines (88 loc) • 2.41 kB
JSON
{
"name": "use-element-fit",
"version": "0.5.0",
"description": "useElementFit is a React hook that allows you to measure and element's based on certain restraints, similar to object-fit in CSS.",
"keywords": [
"resize-observer",
"object-fit",
"background-size"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "rollup -c",
"test:unit": "karma start",
"test": "npm run lint && npm run build && npm run test:unit",
"lint": "npm-run-all lint:*",
"lint:ts": "tslint \"src/**/*.{ts,tsx}\" -p tsconfig.json",
"lint:prettier": "prettier \"src/**/*.{js,jsx,ts,tsx,css}\" --list-different",
"fix": "npm-run-all fix:*",
"fix:ts": "npm run lint:ts -- --fix",
"fix:prettier": "prettier \"src/**/*.{js,jsx,ts,tsx,css}\" --write",
"precommit": "lint-staged"
},
"lint-staged": {
"linters": {
"{src,tests}/**/*.{js,ts,tsx}": [
"prettier",
"tslint -p tsconfig.json"
]
}
},
"pre-push": [
"validate"
],
"husky": {
"hooks": {
"post-commit": "git reset",
"pre-commit": "lint-staged"
}
},
"author": {
"name": "Stuart van Beek",
"email": "art0rz@protonmail.com"
},
"repository": {
"type": "git",
"url": "https://github.com/art0rz/use-element-fit.git"
},
"license": "MIT",
"devDependencies": {
"@types/chai": "^4.1.7",
"@types/mocha": "^5.2.7",
"@types/react": "^16.8.19",
"@types/react-dom": "^16.8.4",
"chai": "^4.2.0",
"delay": "^4.3.0",
"husky": "2.4.1",
"karma": "4.1.0",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "2.2.0",
"karma-mocha": "^1.3.0",
"karma-typescript": "^4.1.0",
"lint-staged": "^8.2.0",
"mocha": "^6.1.4",
"npm-run-all": "^4.1.5",
"prettier": "1.18.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"rimraf": "2.6.3",
"rollup": "1.12.0",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-node-resolve": "^5.0.2",
"rollup-plugin-terser": "5.0.0",
"rollup-plugin-typescript2": "0.21.1",
"tslint": "^5.17.0",
"tslint-config-airbnb": "^5.11.1",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.0.1",
"typescript": "^3.5.1"
},
"dependencies": {
"use-resize-observer": "^3.1.0"
},
"peerDependencies": {
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
}
}