Skip to content

Commit

Permalink
Make sure npm run watch builds ESM/UMD bundles
Browse files Browse the repository at this point in the history
Changes to make sure calling `npm run watch` in any of this
repo's child packages ensures the final bundles are built
after compilation has completed. For the full details on
why this is needed, see:

apollographql/react-apollo#2765
  • Loading branch information
hwillson committed Feb 22, 2019
1 parent 2f197f8 commit e96ae55
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 5 deletions.
112 changes: 112 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"rollup-plugin-typescript2": "0.18.1",
"rxjs": "6.4.0",
"ts-jest": "23.1.4",
"tsc-watch": "^2.1.2",
"tslib": "1.9.3",
"tslint": "5.12.1",
"typescript": "3.3.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-cache-inmemory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"build": "tsc -b .",
"postbuild": "npm run bundle",
"bundle": "../../node_modules/rollup/bin/rollup -c rollup.config.js",
"watch": "tsc -w -p .",
"watch": "../../node_modules/tsc-watch/index.js --onSuccess \"npm run postbuild\"",
"clean": "rm -rf coverage/* lib/*",
"prepublishOnly": "npm run build"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"build": "tsc -b .",
"postbuild": "npm run bundle",
"bundle": "../../node_modules/rollup/bin/rollup -c rollup.config.js",
"watch": "tsc -w -p .",
"watch": "../../node_modules/tsc-watch/index.js --onSuccess \"npm run postbuild\"",
"clean": "rm -rf coverage/* lib/*",
"prepublishOnly": "npm run clean && npm run build"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"build": "tsc -b .",
"postbuild": "npm run bundle",
"build:benchmark": "tsc -p tsconfig.benchmark.json",
"watch": "tsc -w",
"watch": "../../node_modules/tsc-watch/index.js --onSuccess \"npm run postbuild\"",
"bundle": "../../node_modules/rollup/bin/rollup -c rollup.config.js",
"lint": "tslint -c \"../../config/tslint.json\" -p tsconfig.json src/*.ts",
"testonly": "jest",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"build": "tsc -b .",
"postbuild": "npm run bundle",
"bundle": "../../node_modules/rollup/bin/rollup -c rollup.config.js",
"watch": "tsc -w -p .",
"watch": "../../node_modules/tsc-watch/index.js --onSuccess \"npm run postbuild\"",
"clean": "rm -rf coverage/* lib/*",
"prepublishOnly": "npm run clean && npm run build"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-anywhere/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build": "tsc -b .",
"postbuild": "npm run bundle",
"bundle": "../../node_modules/rollup/bin/rollup -c rollup.config.js",
"watch": "tsc -w",
"watch": "../../node_modules/tsc-watch/index.js --onSuccess \"npm run postbuild\"",
"prepublishOnly": "npm run build",
"lint": "tslint -c \"../../config/tslint.json\" -p tsconfig.json src/*.ts",
"clean": "rm -rf coverage/* lib/*"
Expand Down

0 comments on commit e96ae55

Please sign in to comment.