package.json 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. {
  2. "name": "scroll-into-view-if-needed",
  3. "version": "2.2.31",
  4. "description": "Ponyfill for upcoming Element.scrollIntoView() APIs like scrollMode: if-needed, behavior: smooth and block: center",
  5. "keywords": [
  6. "behavior-smooth",
  7. "if-needed",
  8. "polyfill",
  9. "ponyfill",
  10. "scroll",
  11. "scroll-into-view",
  12. "scrollIntoView",
  13. "scrollIntoViewIfNeeded",
  14. "scrollMode",
  15. "smooth",
  16. "smoothscroll",
  17. "typescript"
  18. ],
  19. "homepage": "https://scroll-into-view.dev",
  20. "repository": {
  21. "type": "git",
  22. "url": "git+https://github.com/scroll-into-view/scroll-into-view-if-needed.git"
  23. },
  24. "license": "MIT",
  25. "author": "Cody Olsen",
  26. "sideEffects": false,
  27. "exports": {
  28. ".": {
  29. "types": "./typings/index.d.ts",
  30. "source": "./src/index.ts",
  31. "import": "./es/index.js",
  32. "require": "./index.js",
  33. "default": "./es/index.js"
  34. },
  35. "./package.json": "./package.json"
  36. },
  37. "main": "index.js",
  38. "module": "es/index.js",
  39. "typings": "typings/index.d.ts",
  40. "files": [
  41. "es",
  42. "typings",
  43. "umd"
  44. ],
  45. "scripts": {
  46. "prebuild": "npm run clean",
  47. "build": "npm run build:d.ts && npm run build:cjs && npm run build:es && npm run build:umd && npm run build:umd.min",
  48. "build:cjs": "cross-env BABEL_ENV=cjs babel src -d . --extensions '.ts'",
  49. "build:d.ts": "tsc --emitDeclarationOnly",
  50. "build:es": "cross-env BABEL_ENV=es babel src -d es --extensions '.ts'",
  51. "build:umd": "cross-env BABEL_ENV=umd NODE_ENV=development rollup -c -f umd -o umd/scroll-into-view-if-needed.js",
  52. "build:umd.min": "cross-env BABEL_ENV=umd NODE_ENV=production rollup -c -f umd -o umd/scroll-into-view-if-needed.min.js",
  53. "clean": "rimraf 'umd' 'es' 'typings'",
  54. "dev": "concurrently 'tsc --noEmit --watch' 'tsc --noEmit -p tests/typescript --watch' 'npm run build:cjs --watch' 'npm run build:es --watch' 'npm run build:umd --watch' 'npm run build:umd.min --watch'",
  55. "lint": "eslint ./integration-examples",
  56. "precommit": "lint-staged",
  57. "prepublishOnly": "npm run build",
  58. "typecheck": "tsc --noEmit && tsc --noEmit -p tests/typescript"
  59. },
  60. "browserify": {
  61. "transform": [
  62. "loose-envify"
  63. ]
  64. },
  65. "prettier": {
  66. "semi": false,
  67. "singleQuote": true,
  68. "overrides": [
  69. {
  70. "files": ".babelrc",
  71. "options": {
  72. "parser": "json"
  73. }
  74. }
  75. ]
  76. },
  77. "dependencies": {
  78. "compute-scroll-into-view": "^1.0.20"
  79. },
  80. "devDependencies": {
  81. "@babel/cli": "^7.19.3",
  82. "@babel/core": "^7.20.5",
  83. "@babel/plugin-external-helpers": "^7.18.6",
  84. "@babel/preset-env": "^7.20.2",
  85. "@babel/preset-typescript": "^7.18.6",
  86. "@sanity/semantic-release-preset": "^2.0.2",
  87. "babel-eslint": "^10.1.0",
  88. "babel-plugin-add-module-exports": "^1.0.4",
  89. "babel-plugin-dev-expression": "^0.2.3",
  90. "concurrently": "^7.6.0",
  91. "cross-env": "^7.0.3",
  92. "eslint": "^8.28.0",
  93. "eslint-config-prettier": "^8.5.0",
  94. "eslint-plugin-import": "^2.26.0",
  95. "eslint-plugin-react": "^7.31.11",
  96. "flowgen": "^1.20.1",
  97. "husky": "^7.0.4",
  98. "lint-staged": "^12.5.0",
  99. "prettier": "^2.8.0",
  100. "prettier-plugin-packagejson": "^2.3.0",
  101. "rimraf": "^3.0.2",
  102. "rollup": "^2.79.1",
  103. "rollup-plugin-babel": "^4.4.0",
  104. "rollup-plugin-commonjs": "^10.1.0",
  105. "rollup-plugin-node-resolve": "^5.2.0",
  106. "rollup-plugin-replace": "^2.2.0",
  107. "rollup-plugin-terser": "^7.0.2",
  108. "tslint": "^5.20.1",
  109. "tslint-config-prettier": "^1.18.0",
  110. "typescript": "^4.9.3"
  111. },
  112. "bundlesize": [
  113. {
  114. "path": "./umd/scroll-into-view-if-needed.min.js",
  115. "maxSize": "3.3 kB",
  116. "compression": "none"
  117. }
  118. ]
  119. }