The difference between npm and bower

  node.js, question

I’ve been looking at the front recently, including node.js and bower, grunt. There are two problems
2.node comes with an npm that the management plug-in depends on, and bower is also the management plug-in depends on. They all have similar description files, but what is the difference between the two and how to choose.
3. How does 3.grunt work with bower?
Thank you

Both are package managers
Bower focuses on the front end.

Bower is not recommended. Since the government has stopped maintenance, they suggest that npm should be used directly.

Grunt is not very popular now, because configuration writing is more complicated. You can try gulp.

About collaboration, that is to say, you write the front-end code, then grunt/gulp takes over the code you write and compiles it into another form.

such as

Install dependencies first:

$ npm install jquery --save
import $ from jquery;
 //Here is the code

This ES6 code browser is unknown and cannot be executed.

You can perform a gulp task to convert ES6 to ES5 recognized by the browser.