Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Module browser bundle configuration using webpack #48

Closed
wants to merge 21 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ea9763c
Adding webpack config to create bundle
schrepfler Nov 15, 2016
243d810
Adding browser bundle declaration in package.json
schrepfler Nov 15, 2016
10ac03a
Describing feature to changelog
schrepfler Nov 15, 2016
4c9b4ff
Adding reference to webpack in package.json
schrepfler Nov 15, 2016
30a1d44
Adding webpack step to prepublish and declaring library name and targ…
schrepfler Nov 18, 2016
e0dd42e
Change library export as graphql-subscriptions
schrepfler Nov 19, 2016
3195c4a
As the name is actually an existing artifact, changed to subscription…
schrepfler Nov 19, 2016
ee4b77f
Adding config which exposes the client as a global.
schrepfler Nov 20, 2016
c0939a8
Taking care of PR review comments.
schrepfler Dec 24, 2016
8d35f0c
Reverting dependency updates to leave for a future patch
schrepfler Jan 1, 2017
815d97e
Adding webpack config to create bundle
schrepfler Nov 15, 2016
8b6fd90
Adding browser bundle declaration in package.json
schrepfler Nov 15, 2016
b001028
Describing feature to changelog
schrepfler Nov 15, 2016
c2e7a47
Adding reference to webpack in package.json
schrepfler Nov 15, 2016
c0604b9
Adding webpack step to prepublish and declaring library name and targ…
schrepfler Nov 18, 2016
ad34073
Change library export as graphql-subscriptions
schrepfler Nov 19, 2016
a481a65
As the name is actually an existing artifact, changed to subscription…
schrepfler Nov 19, 2016
af2ffa0
Adding config which exposes the client as a global.
schrepfler Nov 20, 2016
5fc3497
Rebased
schrepfler Feb 2, 2017
90a160b
Tried rebase, had to modify package.json as was getting in loop
schrepfler Feb 2, 2017
e1d68de
Reverting to master dependencies
schrepfler Feb 2, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rebased
  • Loading branch information
schrepfler committed Feb 2, 2017
commit 5fc349799a3dbad0ff4fda39b65352276d0acf72
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
### vNEXT

- Webpack configuration to export the generated code into a browser compatible bundle.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: reference this PR number in the changelog

[PR #48](https://github.com/apollostack/subscriptions-transport-ws/pull/48)

### v0.4.0

25 changes: 18 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
"json-loader": "^0.5.4",
"lodash.isobject": "^3.0.2",
"lodash.isstring": "^4.0.1",
"ts-loader": "^1.2.1",
"ts-loader": "^1.3.3",
"websocket": "^1.0.23"
},
"scripts": {
@@ -27,8 +27,8 @@
"testonly": "mocha --reporter spec --full-trace ./dist/test/tests.js",
"coverage": "node ./node_modules/istanbul/lib/cli.js cover _mocha -- --full-trace ./dist/test/tests.js",
"postcoverage": "remap-istanbul --input coverage/coverage.raw.json --type lcovonly --output coverage/lcov.info",
"start": "webpack --config webpack.config.js",
"prepublish": "npm run compile && npm run start"
"browser-compile": "webpack",
"prepublish": "npm run compile && npm run browser-compile"
},
"devDependencies": {
"@types/chai": "^3.4.32",
@@ -37,17 +37,28 @@
"@types/mocha": "^2.2.31",
"@types/node": "^6.0.38",
"@types/sinon": "^1.16.31",
"@types/chai": "^3.4.34",
"@types/lodash": "^4.14.44",
"@types/mocha": "^2.2.34",
"@types/node": "^6.0.53",
"@types/sinon": "^1.16.33",
"@types/websocket": "^0.0.32",
"chai": "^3.5.0",
"graphql": "^0.7.0",
"graphql": "^0.8.2",
"istanbul": "^1.0.0-alpha.2",
"mocha": "^3.0.0",
"remap-istanbul": "^0.7.0",
"mocha": "^3.1.1",
"remap-istanbul": "^0.8.0",
"sinon": "^1.17.6",
"tslint": "^3.13.0",
"typescript": "^2.0.0",
"typed-graphql": "^1.0.2",
"typescript": "^2.0.3",
"typings": "^1.3.2",
"webpack": "^1.13.3"
"webpack": "^1.14.0",
"graphql-subscriptions": "^0.2.2"
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating all of those packages broke the CI.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only these three all or should I revert all of them?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remap-istanbul particularly since it broke the build

"peerDependencies": {
"graphql-subscriptions": "^0.2.2"
},
"typings": "dist/index.d.ts",
"typescript": {
12 changes: 7 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
var path = require('path');

module.exports = {
context: __dirname + "/src",
entry: './index.ts',
context: path.join(__dirname, '/src'),
entry: './client.ts',
output: {
path: __dirname + '/browser',
path: path.join(__dirname, '/browser'),
filename: 'bundle.js',
library: 'subscriptions_transport_ws'
library: 'SubscriptionsTransportWs'
},
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.ts', '.js']
extensions: ['', '.json', '.ts', '.js']
},
module: {
loaders: [