Node packet manager(NPM) was today’s topic. A much bigger topic then what I realized. No wonder I couldn’t get it to work when I first started doing projects I seen on YouTube. You tubers just nonchalantly typing in NPM into the command line terminal. Meanwhile I’m in the wrong path directory for the NPM to install.
I’ve come a long way since then but still not versed in the 3 layers of web3 and much more to go. The course started with a few conceptual asides to better under NPM.
First aside was a package. Package is code managed and maintained with a package management system. Now a package management system is software that automated installing and updating packages. It also deals with what version you have or need and manages dependencies. Dependencies are code that another set of code depends on to function. For example if you use that code in your app, it is a dependency. Your app depends on it.
Versioning specifies what version a set of code is. This allows other people to track new versions have came out. Allows to watch for new features and to watch for ‘breaking changes’.
A simple rule to follow is Major.Minor.Patch. For example if a version of code on an app was 1.7.3 and only the .3 was changed it was a patch update so some bugs were fixed. Your code should work fine. If the second number .7 was changed in the example it would be a minor change some new features were added. Your code will work fine. However, if the first number in the example was changed it would be a major change. Your code will break most likely.
Finally to install an NPM there is a great website to search for NPM called npmjs.com. This website allows you to browse through the thousands of NPMs which caused the biggest explosion of open source projects to emerge. On the website when you click on a library it will give you details on the library and a command on how to install it as well. Usually it’ll be “npm install (library name)”.
This was just the basics of NPM and I will learn more about using powerful NPMs in tomorrow’s blog.<div class='sharedaddy sd-block sd-like jetpack-likes-widget-wrapper jetpack-likes-widget-unloaded' id='like-post-wrapper-155635758-466-5d07773eba58d' data-src='https://widgets.wp.com/likes/#blog_id=155635758&post_id=466&origin=trilamanila.com&obj_id=155635758-466-5d07773eba58d' data-name='like-post-frame-155635758-466-5d07773eba58d'><h3 class="sd-title">Like this:</h3><div class='likes-widget-placeholder post-likes-widget-placeholder' style='height: 55px;'><span class='button'><span>Like</span></span> <span class="loading">Loading...</span></div><span class='sd-text-color'></span><a class='sd-link-color'></a></div>