package.json 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {
  2. "name": "size-sensor",
  3. "version": "1.0.1",
  4. "description": "DOM element size sensor which will callback when size changed.",
  5. "main": "lib/index.js",
  6. "types": "index.d.ts",
  7. "scripts": {
  8. "debug": "cross-env NODE_ENV=babel cross-env DEBUG_MODE=1 jest",
  9. "test": "cross-env NODE_ENV=babel jest",
  10. "build:umd": "rimraf ./dist && cross-env NODE_ENV=rollup rollup -c",
  11. "build:lib": "rimraf ./lib && cross-env NODE_ENV=babel babel src -d lib",
  12. "build": "npm run build:umd && npm run build:lib && size-limit"
  13. },
  14. "size-limit": [
  15. {
  16. "limit": "1 KB",
  17. "path": "dist/size-sensor.min.js"
  18. }
  19. ],
  20. "repository": {
  21. "type": "git",
  22. "url": "git+https://github.com/hustcc/size-sensor.git"
  23. },
  24. "keywords": [
  25. "resize",
  26. "size",
  27. "sensor",
  28. "size-detector",
  29. "element"
  30. ],
  31. "devDependencies": {
  32. "@babel/cli": "^7.6.0",
  33. "@babel/core": "^7.6.0",
  34. "@babel/preset-env": "^7.6.0",
  35. "babel-jest": "^24.9.0",
  36. "babel-plugin-version": "^0.2.1",
  37. "cross-env": "^5.1.3",
  38. "jest": "^24.9.0",
  39. "jest-electron": "^0.1.6",
  40. "rimraf": "^2.6.2",
  41. "rollup": "^1.21.4",
  42. "rollup-plugin-babel": "^4.3.3",
  43. "rollup-plugin-node-resolve": "^5.2.0",
  44. "rollup-plugin-uglify": "^6.0.3",
  45. "size-limit": "^0.18.2"
  46. },
  47. "jest": {
  48. "runner": "jest-electron/runner",
  49. "testEnvironment": "jest-electron/environment",
  50. "collectCoverage": true,
  51. "collectCoverageFrom": [
  52. "src/**/*.{js,jsx}",
  53. "!**/node_modules/**",
  54. "!**/vendor/**"
  55. ],
  56. "testRegex": "/__tests__/.*\\.spec\\.jsx?$"
  57. },
  58. "author": "hustcc",
  59. "license": "ISC",
  60. "bugs": {
  61. "url": "https://github.com/hustcc/size-sensor/issues"
  62. },
  63. "homepage": "https://git.hust.cc/size-sensor"
  64. }