Showing posts with label npm. Show all posts
Showing posts with label npm. Show all posts

Wednesday, October 9, 2019

angular - install angular cli on ubunut using npm


Installing angular cli on ubuntu using npm

~$ npm install -g @angular/cli
/home/ubuntu/.nvm/versions/node/v10.16.3/bin/ng -> /home/ubuntu/.nvm/versions/node/v10.16.3/lib/node_modules/@angular/cli/bin/ng

> @angular/cli@8.3.8 postinstall /home/ubuntu/.nvm/versions/node/v10.16.3/lib/node_modules/@angular/cli
> node ./bin/postinstall/script.js

? Would you like to share anonymous usage data with the Angular Team at Google under
Google’s Privacy Policy at https://policies.google.com/privacy? For more details and
how to change this setting, see http://angular.io/analytics. Yes

Thank you for sharing anonymous usage data. If you change your mind, the following
command will disable this feature entirely:

    ng analytics off

+ @angular/cli@8.3.8
added 244 packages from 185 contributors in 1178.698s
~$ 



Thursday, September 26, 2019

Node.js - npm - semantic versioning

Node.js developers follow the semantic versioning spec. Here is the small excerpt summary from the website:

Given a version number MAJOR.MINOR.PATCH, increment the:
  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards compatible manner, and
  3. PATCH version when you make backwards compatible bug fixes.


Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.



References:
  1. https://docs.npmjs.com/about-semantic-versioning
  2. https://semver.org/



Node.js - npm - simple commands



To list all npm packages installed.

~$ npm ls
ubuntu@1.0.0 /home/ubuntu
`-- underscore@1.9.1

To remove locally installed npm package
~$ npm rm underscore --save
npm WARN ubuntu@1.0.0 No description
npm WARN ubuntu@1.0.0 No repository field.

removed 1 package in 1.363s
found 0 vulnerabilities

Listing the packages installed using npm.
~$ npm ls
ubuntu@1.0.0 /home/ubuntu
`-- (empty)

Installing the removed package locally again.
~$ npm install underscore --save
npm WARN ubuntu@1.0.0 No description
npm WARN ubuntu@1.0.0 No repository field.

+ underscore@1.9.1
added 1 package from 1 contributor and audited 1 package in 0.697s
found 0 vulnerabilities

Listing the packages installed using npm.
~$ npm ls
ubuntu@1.0.0 /home/ubuntu
`-- underscore@1.9.1

~$