This is a small overview of common Javascript tools.
NPM is the "node package manager". It's a command-line tool you use to download code that other people wrote that you can use in your own projects.
It reads from a package.json
file that contains a bunch of "dependencies" (code other people wrote) that looks like this:
{
"dependencies": {
"firebase": "^7.6.1",
"react": "^16.12.0",
"next": "latest",
}
}
When you first try to use a javascript project, it'll likely ask you to run this:
npm install
This will download those dependencies
from the internet and store them on your computer in the correct place. This is much better than having to download a zip file and installing it yourself!
Some projects, like nextjs
projects, have their own commands for "starting" your app. npm
is often used to run these commands for you.
Some common commands look like:
npm run dev # starts the app on your computer
npm run test # runs any tests
npm run fmt # formats your code