npm is the package manager. The npm packages are cross-platform packages developed using JavaScript. npmjs.com is the popular public registry hosting these node packages.
However, many organizations develop custom node modules or in-house UI frameworks, which they prefer keeping on-premises rather than on public repository at https://www.npmjs.com/.
In this recipe, we will create a sample npm module and set up a build pipeline so that its version is updated with each build. We will then create a release pipeline to publish the package to our Artifacts feed.
Our sample npm module allows any user to consume the module by using the require
statement. Calling the function will just print the demo statement to the console. For this recipe, you need to have NodeJS installed in your machine. If you don't have it already, download and install it from https://nodejs.org/en/download.
To check the version of the node on your machine, after installing node...