Week 1 Backend - Plous01/ProjectTech GitHub Wiki
Packages (feature)
This week, I learned the basics of Node modules and Node packages. I set up a boilerplate for my own feature (a dating web app for sporty students). I included a package.json. I also picked a package from nmp that would be helpful for my web app (for example, nodemon and camelcase).
Questions
What's the difference between dependencies and devDependencies?
The difference between these two, is that devDependencies are modules which are only required during development, while dependencies are modules which are also required at runtime. To save a dependency as a devDependency on installation we need to do an npm install --save-dev , instead of just an npm install --save.
What are the differences between global and local dependencies?
Global | Local |
---|---|
You create global dependencies independently of any specific object. | You create local dependencies for a specific characteristic or characteristic value. |
You can then link the global dependency to any characteristic or characteristic value. | You can only use a local dependency for the object for which it is created |
You assign an external name to identify a global dependency. | The system assigns an internal name to identify a local dependency. |
Global dependencies are maintained and managed centrally. Changes to a global dependency affect the dependency wherever it is used. |