Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is npm i bootstrap@next?

When I was going through on configuring bootstrap in angularjs 2, I came across the below step in this link,

How to add bootstrap to an angular-cli project

npm i bootstrap@next

I understand if we run the below command,

npm i -S [email protected] 

Then this will install bootstrap alpha version. But if we give @next, which version will be installed ?

Also what --save with @next like,

npm i bootstrap@next --save

which is recommended ? and also how can we confirm the version of the installed version ?

like image 672
Naveen Avatar asked Apr 10 '17 15:04

Naveen


1 Answers

using @ after an NPM package name denotes a version OR a tag

try npm view bootstrap you'll get this output:

note the tag next is for the version 4.0.0-alpha.6

docs for the view command: https://docs.npmjs.com/cli/view

{ name: 'bootstrap',
  description: 'The most popular front-end framework for developing responsive, mobile first projects on the web.',
  'dist-tags': { latest: '3.3.7', next: '4.0.0-alpha.6' },
  versions: 
   [ '0.0.1',
     '0.0.2',
     '3.1.1',
     '3.2.0',
     '3.3.0',
     '3.3.1',
     '3.3.2',
     '3.3.4',
   ...

as for --save or -S they are both aliases for the same thing read more here: https://docs.npmjs.com/cli/install from the npm install doc link above:

-S, --save: Package will appear in your dependencies.

like image 152
Ahmed Musallam Avatar answered Sep 22 '22 21:09

Ahmed Musallam