|
7 | 7 | "test:unit:watch": "MOCK_AXIOS=true jest ./tests/unit --watch",
|
8 | 8 | "test:integration": "jest ./tests/integration/",
|
9 | 9 | "test:integration:watch": "jest ./tests/integration/ --watch",
|
10 |
| - "build": "npm run build:dist && npm run build:lib", |
11 |
| - "build:dist": "webpack --mode production", |
12 |
| - "build:lib": "NODE_ENV=production babel src --out-dir lib", |
| 10 | + "build": "rm -rf ./dist && rollup -c", |
13 | 11 | "prepublish": "in-publish && npm run build || not-in-publish",
|
| 12 | + "prepare": "npm run build", |
14 | 13 | "lint": "standard ./src",
|
15 | 14 | "semantic-release": "semantic-release",
|
16 | 15 | "server": "node ./tests/integration/mockServer.js",
|
17 | 16 | "server:dev": "nodemon ./tests/integration/mockServer.js"
|
18 | 17 | },
|
19 |
| - "main": "lib/typeform.js", |
20 |
| - "directories": { |
21 |
| - "lib": "lib", |
22 |
| - "test": "tests" |
23 |
| - }, |
| 18 | + "main": "dist/index.cjs.js", |
| 19 | + "browser": "dist/typeform-api.js", |
| 20 | + "module": "dist/index.esm.js", |
24 | 21 | "engines": {
|
25 | 22 | "node": ">=8"
|
26 | 23 | },
|
|
42 | 39 | "url": "https://github.com/Typeform/js-api-client/issues"
|
43 | 40 | },
|
44 | 41 | "homepage": "https://github.com/Typeform/js-api-client#readme",
|
| 42 | + "files": [ |
| 43 | + "dist/**", |
| 44 | + "LICENSE.md", |
| 45 | + "package.json", |
| 46 | + "package-lock.json", |
| 47 | + "README.md", |
| 48 | + "yarn.lock" |
| 49 | + ], |
45 | 50 | "dependencies": {
|
46 | 51 | "axios": "^0.19.0"
|
47 | 52 | },
|
|
70 | 75 | "json-server": "^0.14.0",
|
71 | 76 | "lint-staged": "^7.0.4",
|
72 | 77 | "nodemon": "^1.18.3",
|
| 78 | + "rollup": "^1.20.0", |
| 79 | + "rollup-plugin-commonjs": "^10.0.2", |
| 80 | + "rollup-plugin-json": "^4.0.0", |
| 81 | + "rollup-plugin-node-resolve": "^5.2.0", |
| 82 | + "rollup-plugin-terser": "^5.1.1", |
73 | 83 | "semantic-release": "^15.13.19",
|
74 |
| - "standard": "^11.0.1", |
75 |
| - "webpack": "^4.20.2", |
76 |
| - "webpack-cli": "^3.1.1" |
| 84 | + "standard": "^11.0.1" |
77 | 85 | },
|
78 | 86 | "lint-staged": {
|
79 | 87 | "*.js": [
|
|
0 commit comments