UNPKG

use-is-in-viewport

Version:

A react hook to use the IntersectionObserver declaratively in your React app.

92 lines (91 loc) 2.65 kB
{ "scripts": { "clean": "rimraf built", "typecheck": "tsc --noEmit -p .", "lint": "tslint -p ./tsconfig.json", "bundle": "microbundle -f es,umd --tsconfig ./tsconfig.json", "build": "npm run clean && npm run typecheck && npm run lint && npm run bundle", "prepack": "npm run build", "watch": "microbundle watch", "cra:build": "npm run build && npm link && cd examples/cra/ && pwd && npm run build", "cra:start": "cd examples/cra/ && pwd && npm run start-for-cypress", "cra:stop": "cd examples/cra/ && pwd && npm run kill-old-server", "cypress:run": "echo \"Starting cypress...\" && cypress run", "test": "npm run cra:build && npm run cra:start && npm run cypress:run && npm run cra:stop", "test-ci": "npm run cra:build && npm run cra:start && npm run cypress:run", "prettier": "prettier --config ./.prettierrc --write \"{src,test,bin,lib,config}/**/*.{ts,json,css,html,md}\"", "publish-package": "np" }, "devDependencies": { "@types/react": "^16.9.23", "cypress": "^3.7.0", "husky": "^4.2.3", "lint-staged": "^10.0.8", "microbundle": "^0.11.0", "np": "^6.2.0", "prettier": "1.19.1", "rimraf": "^3.0.2", "ts": "^0.2.2", "tslint": "^5.15.0", "tslint-config-prettier": "^1.18.0", "typescript": "^3.8.3" }, "dependencies": { "observe-element-in-viewport": "0.0.15" }, "peerDependencies": { "react": "^16.8.6" }, "engines": { "node": ">=10" }, "husky": { "hooks": { "pre-commit": "lint-staged" } }, "lint-staged": { "*.ts": [ "tsc --noEmit -p .", "tslint --fix", "prettier --write", "git add" ], "*.{json,md,html,css}": [ "prettier --write", "git add" ], ".circleci/config.yml": [ "prettier --write", "circleci config validate", "git add" ] }, "name": "use-is-in-viewport", "description": "A react hook to use the IntersectionObserver declaratively in your React app.", "version": "1.0.9", "source": "src/index.ts", "main": "built/index.umd.js", "module": "built/index.esm.js", "types": "built/index.d.ts", "sideEffects": false, "keywords": [ "react", "hook", "intersection observer", "viewport" ], "author": "Mudit Ameta <zeusdeux@gmail.com>", "license": "MIT", "directories": { "example": "examples" }, "repository": { "type": "git", "url": "git+https://github.com/zeusdeux/use-is-in-viewport.git" }, "bugs": { "url": "https://github.com/zeusdeux/use-is-in-viewport/issues" }, "homepage": "https://github.com/zeusdeux/use-is-in-viewport#readme" }