Use MPM to down-load JQuery in the current directory (single ingridient)

now you can delete jquery. because we will install it again in a better way.

Grocery List

after this in the current directory you should find a new file name: “package.json”  this file keeps track of all the packages that our project uses, you want want one of this for each one of you projects, now lest open it with a text editor and we will find something like:

you can delete most of it just make sure to keep: “name” & “version” lines, and save the changes.

now back in the command line lest Down-load JQuery again. but this time with a little extra code: “–save”

The same folders will appear, but if you check your file name: “package.json” you will find that the line “Dependencies” was created with “jquery 3.1.1” on it.

now lest install another package:

and as expected: withing the “node_modules” folder the “normalize.css” will apear aswell as the file name: “package.json” will be updated.

one reason this is a cool feature would be:  Delete the “node_modules” folder, now to get it back in the command line type:

and this will bring them back again.

Now to Find out what other packages can be use in your future projects: in the website:  there you can search and browse for packages. or you can Google: “what you are hopping to achieve + npm”.





Copyright 2017. All rights reserved.

Posted February 2, 2017 by Edmundo in category "Node