Files
cypress/packages/socket
Zach Bloomquist e2ea5bf663 Fix patch-package (#6583)
* fix patch-package

- don't hoist dependencies that are patched, this way we can be assured the path is always correct
- put all patches in root postinstall so postinstall-postinstall is guaranteed to work

* wip

* Revert "fix patch-package"

This reverts commit 5583f21478.

* use per package patches

* don't ignor engines or silence

* try: make sinon patch devonly

* fix socketspec

* run full ci on this branch

* bump xcode tools to bump mac node version

* also run appveyor

* Revert "run full ci on this branch"

This reverts commit c3e52d09ec.

* Revert "also run appveyor"

This reverts commit bfe7b0499a.
2020-02-28 12:17:54 -05:00
..
2020-02-28 12:17:54 -05:00
2020-02-28 12:17:54 -05:00
2020-02-28 12:17:54 -05:00
2020-02-28 12:17:54 -05:00
2020-02-11 12:40:07 +06:30

Socket

This is a shared lib for holding both the socket.io server and client.

Using

const socket = require("packages/socket")

// returns
{
  server: require("socket.io"),
  client: require("socket.io-client"),
  getPathToClientSource: function () {
    // returns path to the client 'socket.io.js' file
    // for use in the browser
  }
}
const socket = require("packages/socket")

// server usage
const srv = require("http").createServer()
const io = socket.server(srv)
io.on("connection", function(){})

// client usage
const client = socket.client("http://localhost:2020")
client.on("connect", function(){})
client.on("event", function(){})
client.on("disconnect", function(){})

// path usage
socket.getPathToClientSource()
// returns your/path/to/node_modules/socket.io-client/socket.io.js0

Testing

yarn lerna run test --scope @packages/socket --stream