Comments (4)
Published v4.0.0. Give it a try!
from node-ssdp.
I just adjusted the webpack config - not to say that this is convenient, but it's more convenient that building some dependencies inside of node_modules
:
Add the following to the plugins of your webpack config
new webpack.NormalModuleReplacementPlugin(/\.\/lib-cov\/.*/, resource => {
resource.request = resource.request.replace("-cov", "");
})
Caution: If you have other modules that contain ./lib-cov/
as part of their path, it will break those - in such a case I guess you'll need to add a separate entry for each of those 3 files.
Btw.: I'm using webpack4, so I'm not 100% sure if it's exactly the same with webpack2 or 1, but there should be similar alternatives. (see: https://webpack.js.org/plugins/normal-module-replacement-plugin/)
from node-ssdp.
@jsinai I've not used webpack but do you think this would make it deal with it better:
module.exports = {
Server: require(process.env.SSDP_COV ? "./lib-cov/server" : "./lib/server"),
Client: require(process.env.SSDP_COV ? "./lib-cov/client" : "./lib/client"),
Base: require(process.env.SSDP_COV ? "./lib-cov/index" : "./lib/index")
}
since it sounds like the issue is with using require
?
Or, I can do this check in the tests themselves so it would be complete out of the main module. Actually. that's what I'll do, it's cleaner.
from node-ssdp.
Sorry for the very late response, but your fix worked.
from node-ssdp.
Related Issues (20)
- Please add documentation of all public methods
- Unexpected IP Address In SSDP Server Advertising
- Description of search
- Handle ssdp:byebye
- Default behaviour with multiple NICs is not good
- TypeError: mDgram.createSocket is not a function
- Client and Server examples appear to be wrong.
- 'npm audit' shows dependency on a vulnerable version of async
- Creating client always ends in "No sockets available, cannot start." HOT 2
- Unhandled promise rejection HOT 1
- Using pkg to create stand-alone executable HOT 1
- is there any code error? HOT 2
- Dependency on dgram? HOT 3
- ssdp server sending [object Object] string on LOCATION instead the right value HOT 1
- startServer() should fail if no ipaddress available HOT 2
- Client not detecting my Panasonic Viera TV HOT 8
- Server.stop() fails to wait for 'bye' to complete before killing sockets.
- Error: write ENOTSUP HOT 1
- Not response if more than one host (win 7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-ssdp.