|
2 | 2 | "name": "react-intersection-observer", |
3 | 3 | "version": "4.0.2", |
4 | 4 | "description": "Monitor if a component is inside the viewport, using IntersectionObserver API", |
5 | | - "main": "lib/index.js", |
| 5 | + "main": "dist/react-intersection-observer.cjs.js", |
| 6 | + "jsnext:main": "dist/react-intersection-observer.esm.js", |
| 7 | + "module": "dist/react-intersection-observer.esm.js", |
6 | 8 | "author": "Daniel Schmidt", |
7 | 9 | "typings": "index.d.ts", |
| 10 | + "files": [ |
| 11 | + "dist" |
| 12 | + ], |
8 | 13 | "repository": { |
9 | 14 | "type": "git", |
10 | | - "url": "https://github.com/thebuilder/react-intersection-observer" |
| 15 | + "url": "https://github.com/thebuilder/react-intersection-observer.git" |
11 | 16 | }, |
12 | 17 | "license": "MIT", |
13 | 18 | "keywords": [ |
|
19 | 24 | ], |
20 | 25 | "scripts": { |
21 | 26 | "coveralls": "cat ./coverage/lcov.info | coveralls", |
22 | | - "build": "rm -rf lib es && npm run build:lib && npm run build:flow", |
23 | | - "build:lib": "babel src --out-dir lib --ignore __*,*.story.js,*.test.js", |
| 27 | + "build": "rm -rf dist && npm run build:lib && npm run build:flow", |
| 28 | + "build:lib": "run-p rollup:*", |
24 | 29 | "build:storybook": "build-storybook --output-dir example", |
25 | | - "build:flow": "flow-copy-source -v src lib", |
| 30 | + "build:flow": "node scripts/create-flow", |
26 | 31 | "dev": "concurrently -k -r 'jest --watch' 'npm run storybook'", |
27 | 32 | "lint": "eslint {src,stories,tests}/. ", |
| 33 | + "rollup:es": "rollup -c --environment FORMAT:es", |
| 34 | + "rollup:cjs": "rollup -c --environment FORMAT:cjs", |
| 35 | + "rollup:umd": "rollup -c --environment FORMAT:umd", |
| 36 | + "rollup:umd.min": "rollup -c --environment MINIFY,FORMAT:umd", |
28 | 37 | "precommit": "flow && lint-staged", |
29 | 38 | "postcommit": "git update-index --again", |
30 | 39 | "prepare": "npm run build", |
|
59 | 68 | "enzyme-to-json/serializer" |
60 | 69 | ], |
61 | 70 | "setupFiles": [ |
62 | | - "<rootDir>/jest-setup.js" |
| 71 | + "<rootDir>/scripts/jest-setup.js" |
63 | 72 | ], |
64 | 73 | "coveragePathIgnorePatterns": [ |
65 | 74 | "/node_modules/", |
|
79 | 88 | "babel-cli": "^6.24.1", |
80 | 89 | "babel-core": "^6.26.3", |
81 | 90 | "babel-jest": "^22.4.3", |
| 91 | + "babel-plugin-external-helpers": "^6.22.0", |
82 | 92 | "babel-preset-env": "^1.7.0", |
83 | 93 | "babel-preset-react": "^6.24.1", |
84 | 94 | "babel-preset-stage-2": "^6.24.1", |
|
96 | 106 | "intersection-observer": "^0.5.0", |
97 | 107 | "jest": "^22.4.3", |
98 | 108 | "lint-staged": "^7.0.0", |
| 109 | + "npm-run-all": "^4.1.3", |
99 | 110 | "prettier": "^1.12.1", |
100 | 111 | "react": "^16.3.2", |
101 | 112 | "react-dom": "^16.3.2", |
102 | 113 | "react-test-renderer": "^16.3.2", |
103 | | - "request": "~2.86.0" |
| 114 | + "rollup": "^0.59.1", |
| 115 | + "rollup-plugin-babel": "^3.0.3", |
| 116 | + "rollup-plugin-commonjs": "^9.1.0", |
| 117 | + "rollup-plugin-node-resolve": "^3.3.0", |
| 118 | + "rollup-plugin-replace": "^2.0.0", |
| 119 | + "rollup-plugin-uglify": "^4.0.0" |
104 | 120 | } |
105 | 121 | } |
0 commit comments