When I run npm install #aspnet/signalr in my project directory, over 20 modules are installed into node_modules. However, in the actuall project, for example on a webpage, only signalr.js needs to be referenced. How does signalr.js reference its dependencies?
One additional example I find confusing is that when bundling, only signalr.js needs to be put into bundleconfig.json for SignalR to work in the project. Are the other dependencies actually needed?
Related
I am using npm, yarn build as manager tool. Using these tech, create two project , CommonLib and SampleProject. so first I build CommonLib project, release its library and publish it to AWS codeartifact then ref that published artifact to SampleProject.
This flow looks fine and works well as well. But this whole process force us to publish our changes to artifact which block other.
So not think to do change locally in IDE (here is mscode), release it locally and then ref it to SampleProject.
I used npm install ../CommonLib command to install the package and IDE start point to locally project. But it doesn't compile the project.
Can anyone help me on this, what could be wrong here.
We got couple of different projects that are using main dependencies like React and TypeScript packages. Each of those projects(maintained by different dev team) is using diferent version of React and TypeScript - question here:
Is there any clever way to share/inherit/force to use specific version of main dependencies across all those projects? i.e.:
Yes, this is definitely possible. Simplest way is to create an npm module with the required common dependencies in a package.json file and publish this into your repo. Then in the projects, require that published npm module as a dependency. The projects can than further require other dependencies and override any from the parent if needed.
When webpack bundles the node_modules my project needs, do I still need dependencies or could I list everything to devDependencies?
I have created a react component library and have published it to npm. The only peerDependencies I've listed are react and react-dom, because, well, you'll need them when using my library. At first I set up my project like I normally would, stuff like babel, eslint, css-loader listed in the devDependencies, and stuff I actually use in my code, like prop-types, classnames, react-slick, listed as dependencies.
I then use webpack with babel to create one main.js with the module imports included
When someone on my team tries to use my library npm will give some errors 'Peer dependencies unmet' with stuff like webpack, eslint & #babel/core. So I'm guessing these are some peer dependencies from my dependencies? (that's a little side question)
That got me thinking, do I even need dependencies at all? Since webpack bundles everything and I only use my main.js, shouldn't everything be a devDependency?
Dependencies are those that your project needs to run, like a library that provides functions that you call from your code.
Dev dependencies are dependencies you only need during development or releasing, like compilers that take your code and compile it into javascript, test frameworks or documentation generators.
So I'm creating my own ivy repository. I have went through the tutorial for building the repository and the basic task of installing one module works flawlessly. Of course, there we have examples of installing one module. Actually the ant task install can do only one module at the time. Since I'd like to store everything that's in the cache in the repository, it would be quite tedious to do that by running one module at the time...
Other then writing some kind of a build.xml generator that would have install task for each of the module I need/have, is there an easier way to do this? If there is some trick to use some kind of meta ivy.xml that has all the dependencies I need installed, that would also be ok.
In addition if I run install on one module with transitive=true, for example module M, in my repo I have M's jar,sources,javadoc and everything, but for M's dependencies - only the jars. How would I install sources,javadocs,etc of transitively dependent modules?
The question is simple:
I am using Play Framework 2.2 and want to know how it's possible that when I add a dependency to build.sbt it won't include this library automatically to the project.
I still have to manually go to the cache directory and include the jar from there and I don't think that's normal behavior, is it?
What am I doing wrong?
Procedure:
Add dependency to build.sbt
Run play dependencies and play update
Open project again, dependency still not included as a library which it should
After updating dependencies, all you need is to use play idea command again in your terminal. Then Idea will reload project with new dependencies.