Package JSON Demystified - Dependencies and DevDependencies

Тәжірибелік нұсқаулар және стиль

In this Javascript tutorial on NPM Package.JSON keywords 'dependencies' and 'devDependencies' we look at how they are used to tailor the experience for consumers of your NPM package and then also developers working on enhancements to the package itself.

Пікірлер: 18

  • @gideon8648
    @gideon86483 жыл бұрын

    Thanks for sharing. Years using npm and I just discovered the difference between dependencies and dev-dependencies.

  • @Ashotofcode

    @Ashotofcode

    3 жыл бұрын

    Glad it was helpful Gideon :-) Cheers Mark

  • @lownanzhi3641
    @lownanzhi36412 жыл бұрын

    awesome !

  • @Ashotofcode

    @Ashotofcode

    2 жыл бұрын

    Glad you enjoyed😎 cheers Mark

  • @anafilipasilvamendes5025
    @anafilipasilvamendes50252 жыл бұрын

    Thanks! Very good content!

  • @Ashotofcode

    @Ashotofcode

    2 жыл бұрын

    Glad you liked it Ana :-) Cheers Mark

  • @andrerip
    @andrerip2 жыл бұрын

    great explanation! thanks!

  • @Ashotofcode

    @Ashotofcode

    2 жыл бұрын

    Glad you enjoyed it Andre 🙂Cheers Mark

  • @MichaelSalo
    @MichaelSalo3 жыл бұрын

    Good demo. It's still a little unclear how npm decides who is a user vs who is a developer. They both install via 'npm install'.

  • @Ashotofcode

    @Ashotofcode

    3 жыл бұрын

    Hi Michael, good question, this part comes down to where your package.json is located, npm will only install the devDependencies from a package.json in the current folder, which will be your package.json if developing a package. When we then npm install a dependency it ends up in the node_modules folder, and these ones only the dependencies will get installed for :-) Cheers Mark

  • @joostschuur

    @joostschuur

    2 жыл бұрын

    @@Ashotofcode Super interesting, I did not know this!

  • @alex.noriega
    @alex.noriega2 жыл бұрын

    I'm very grateful with you for sharing this knowledge, already subscribed to your channel and I would like to know more about NPM environment Thumbs Up 👍

  • @Ashotofcode

    @Ashotofcode

    2 жыл бұрын

    Thanks Alex, more to come I'm intending yes 🙂

  • @petervalencic5485
    @petervalencic54852 жыл бұрын

    Thank you!

  • @Ashotofcode

    @Ashotofcode

    2 жыл бұрын

    Welcome Peter! Glad was useful 🙂Cheers Mark

  • @ganeshkumarchandrasekaran
    @ganeshkumarchandrasekaran2 жыл бұрын

    Thanks for the demo, extremely useful, please let me know like if a project contains many libraries and each lib has it’s own package.json and a root application which has these libs in the dependency section, so if a package say ‘abc’ is present as a dev dependency and peer dependency in one of the libs and as a dependency in the root application( we run the root application) , do we still need to add the package as a Dev dependency to the lib?

  • @drewbird87
    @drewbird873 жыл бұрын

    ☀️

  • @Ashotofcode

    @Ashotofcode

    3 жыл бұрын

    Thanks Andrew :-)

Келесі