Junior — Middle
Millised on peamised käsud, mida kasutatakse NPM pakettide halduriga töötamisel?
sobes.tech AI
Vastus AI-lt
NPM package management main commands:
npm init— initializes a new project by creating apackage.jsonfile.npm install <package>ornpm i <package>— installs a package and adds it to dependencies.npm uninstall <package>— removes a package from the project.npm update— updates installed packages to the latest versions.npm run <script>— runs custom scripts defined inpackage.json.npm list— displays a list of installed packages.npm publish— publishes a package to the NPM registry.npm cache clean— clears the NPM cache.
Example of installing and running a script:
npm install express
npm run start
These commands allow managing dependencies and automating tasks in Node.js projects.