136 lines
3.5 KiB
JSON
Executable File
136 lines
3.5 KiB
JSON
Executable File
{
|
|
"name": "@react-hook/intersection-observer",
|
|
"version": "3.1.2",
|
|
"homepage": "https://github.com/jaredLunde/react-hook/tree/master/packages/intersection-observer#readme",
|
|
"repository": "github:jaredLunde/react-hook",
|
|
"bugs": "https://github.com/jaredLunde/react-hook/issues",
|
|
"author": "Jared Lunde <jared.lunde@gmail.com> (https://jaredLunde.com)",
|
|
"license": "MIT",
|
|
"description": "A React hook for the IntersectionObserver API that uses a polyfill when the native API is not available",
|
|
"keywords": [
|
|
"react",
|
|
"react hook",
|
|
"hook",
|
|
"react hooks",
|
|
"hooks",
|
|
"intersection",
|
|
"intersection observer",
|
|
"use intersection observer",
|
|
"useintersectionobserver"
|
|
],
|
|
"main": "dist/main/index.js",
|
|
"module": "dist/module/index.js",
|
|
"unpkg": "dist/umd/use-intersection-observer.js",
|
|
"source": "src/index.tsx",
|
|
"types": "types/index.d.ts",
|
|
"files": [
|
|
"/dist",
|
|
"/src",
|
|
"/types"
|
|
],
|
|
"exports": {
|
|
".": {
|
|
"browser": "./dist/module/index.js",
|
|
"import": "./dist/esm/index.mjs",
|
|
"require": "./dist/main/index.js",
|
|
"umd": "./dist/umd/use-intersection-observer.js",
|
|
"source": "./src/index.tsx",
|
|
"types": "./types/index.d.ts",
|
|
"default": "./dist/main/index.js"
|
|
},
|
|
"./package.json": "./package.json",
|
|
"./*": "./*"
|
|
},
|
|
"sideEffects": false,
|
|
"scripts": {
|
|
"build": "lundle build --umd-case camel",
|
|
"check-types": "lundle check-types",
|
|
"dev": "lundle build -f module,cjs -w",
|
|
"format": "prettier --write \"{,!(node_modules|dist|coverage)/**/}*.{ts,tsx,js,jsx,md,yml,json}\"",
|
|
"lint": "eslint . --ext .ts,.tsx",
|
|
"prepublishOnly": "npm run lint && npm run test && npm run build && npm run format",
|
|
"test": "jest",
|
|
"validate": "lundle check-types && npm run lint && jest --coverage"
|
|
},
|
|
"husky": {
|
|
"hooks": {
|
|
"pre-commit": "lundle check-types && lint-staged"
|
|
}
|
|
},
|
|
"lint-staged": {
|
|
"**/*.{ts,tsx,js,jsx}": [
|
|
"eslint",
|
|
"prettier --write"
|
|
],
|
|
"**/*.{md,yml,json}": [
|
|
"prettier --write"
|
|
]
|
|
},
|
|
"eslintConfig": {
|
|
"extends": [
|
|
"lunde"
|
|
]
|
|
},
|
|
"eslintIgnore": [
|
|
"node_modules",
|
|
"coverage",
|
|
"dist",
|
|
"test",
|
|
"*.config.js"
|
|
],
|
|
"jest": {
|
|
"moduleDirectories": [
|
|
"node_modules",
|
|
"src",
|
|
"test"
|
|
],
|
|
"testMatch": [
|
|
"<rootDir>/src/**/?(*.)test.{ts,tsx}"
|
|
],
|
|
"collectCoverageFrom": [
|
|
"**/src/**/*.{ts,tsx}"
|
|
],
|
|
"setupFilesAfterEnv": [
|
|
"./test/setup.js"
|
|
],
|
|
"snapshotResolver": "./test/resolve-snapshot.js",
|
|
"globals": {
|
|
"__DEV__": true
|
|
}
|
|
},
|
|
"prettier": {
|
|
"semi": false,
|
|
"singleQuote": true,
|
|
"jsxSingleQuote": true,
|
|
"bracketSpacing": false
|
|
},
|
|
"devDependencies": {
|
|
"@testing-library/jest-dom": "latest",
|
|
"@testing-library/react": "latest",
|
|
"@testing-library/react-hooks": "latest",
|
|
"@testing-library/user-event": "latest",
|
|
"@types/jest": "latest",
|
|
"@types/react": "latest",
|
|
"@types/react-dom": "latest",
|
|
"babel-jest": "latest",
|
|
"eslint": "latest",
|
|
"eslint-config-lunde": "latest",
|
|
"husky": "latest",
|
|
"jest": "latest",
|
|
"lint-staged": "latest",
|
|
"lundle": "^0.4.9",
|
|
"prettier": "latest",
|
|
"react": "latest",
|
|
"react-dom": "latest",
|
|
"react-test-renderer": "latest",
|
|
"typescript": "latest"
|
|
},
|
|
"dependencies": {
|
|
"@react-hook/passive-layout-effect": "^1.2.0",
|
|
"intersection-observer": "^0.10.0"
|
|
},
|
|
"peerDependencies": {
|
|
"react": ">=16.8"
|
|
}
|
|
}
|