-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(app:socket.io): build socket.io into vendor.js #455
feat(app:socket.io): build socket.io into vendor.js #455
Conversation
grunt-changelog can't parse commits with colons in the scope i.e: (app:socket.io) Could you change the commit message? |
Doh! Sorry, will do. One quick thought... |
👍 Sounds good. |
Changes: - Move socket.io script tag inside vendor.js build - Add `node_modules` to vendor script locations - Change socket.io path to `/socket.io-client` in serve and client - Will not serve socket.io.js when server is ran in `production` env - Add `socket.io-client` to package.json for a more consistent build
@DaftMonk, in |
feat(app:socket.io): build socket.io into vendor.js
Thats ok, I got it. |
<!-- bower:js --> | ||
<!-- endbower --> | ||
<% if(filters.socketio) { %><script src="socket.io-client/socket.io.js"></script><% } %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kingcody What happens, here? I'm confused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We moved the socket.io script tag inside the usemin build block so it will get included in vendor.js. We add node_modules
to the search glob for the build, and change the path to socket.io-client/...
since we install socket.io-client
as a dependency. That way the paths all line up nicely and we still use the same script that socket.io would serve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, thank you :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you take a look at the server and client scripts where we setup socket.io, you should see where we've adjusted the paths to match.
Changes:
node_modules/socket.io/node_modules
to vendor script locations/socket.io-client
in serve and clientproduction
env