|
1 | 1 | {
|
2 | 2 | "name": "react-timeago",
|
3 |
| - "version": "5.3.0", |
| 3 | + "version": "6.0.0", |
4 | 4 | "description": "A simple Time-Ago component for ReactJs",
|
5 | 5 | "main": "lib/index.js",
|
| 6 | + "module": "es6/index.js", |
6 | 7 | "scripts": {
|
7 |
| - "babel": "babel src/ --out-dir lib/", |
8 |
| - "build": "npm run babel && npm run cpflow && npm run example", |
| 8 | + "babel-es6": "babel src/ --out-dir es6/ --presets=@babel/react,@babel/flow", |
| 9 | + "babel": "babel src/ --out-dir lib/ --presets=@babel/env,@babel/react,@babel/flow", |
| 10 | + "build": "npm run babel && npm run babel-es6 && npm run cpflow && npm run cpflow-es6 && npm run example", |
| 11 | + "cpflow-es6": "find ./src -name '*.js' -not -path '*/__*' | while read filepath; do cp $filepath `echo $filepath | sed 's/\\/src\\//\\/es6\\//g'`.flow; done", |
9 | 12 | "cpflow": "find ./src -name '*.js' -not -path '*/__*' | while read filepath; do cp $filepath `echo $filepath | sed 's/\\/src\\//\\/lib\\//g'`.flow; done",
|
10 |
| - "example": "browserify -t babelify --debug examples/simple/index.js -o examples/simple/bundle.js", |
| 13 | + "example": "rollup -c ./rollup.config.js", |
11 | 14 | "prepublish": "npm run build",
|
12 | 15 | "test": "jest --coverage"
|
13 | 16 | },
|
|
44 | 47 | "@babel/preset-flow": "^7.13.13",
|
45 | 48 | "@babel/preset-react": "^7.13.13",
|
46 | 49 | "@babel/preset-stage-1": "^7.8.3",
|
| 50 | + "@rollup/plugin-babel": "^5.3.0", |
| 51 | + "@rollup/plugin-commonjs": "^19.0.0", |
| 52 | + "@rollup/plugin-node-resolve": "^13.0.0", |
| 53 | + "@rollup/plugin-replace": "^2.4.2", |
47 | 54 | "@testing-library/jest-dom": "^5.11.4",
|
48 | 55 | "@testing-library/react": "^11.0.4",
|
49 | 56 | "babel-jest": "^26.3.0",
|
50 |
| - "babelify": "^10.0.0", |
51 |
| - "browserify": "^17.0.0", |
52 | 57 | "eslint-config-prettier": "^8.3.0",
|
53 | 58 | "eslint-plugin-flowtype": "^5.7.2",
|
54 | 59 | "eslint-plugin-import": "^2.23.0",
|
|
57 | 62 | "prettier": "^2.3.0",
|
58 | 63 | "react": "^17.0.2",
|
59 | 64 | "react-addons-test-utils": "^15.6.2",
|
60 |
| - "react-dom": "^17.0.2" |
| 65 | + "react-dom": "^17.0.2", |
| 66 | + "rollup": "^2.47.0" |
61 | 67 | },
|
62 | 68 | "dependencies": {
|
63 | 69 | "eslint": "^7.26.0"
|
|
0 commit comments