重学Node 0x2 NPM

Roxana ·
更新时间:2024-11-10
· 570 次阅读

init 
npm init

Install 
npm install underscore

Using 
// index.js
const _ = require('underscore')
// require work
// Core module
// File or folder
// node_modules
const result = _.contains([1,2,3],3)
console.log(result)

Semantic Versioning

Major.Minor.Patch

^1.4.1 => 1.x

~1.4.1 => 1.4.x

1.4.1 => 1.4.1

Listing the Insatlled Package
npm list

npm list --depth=0

 View Registry Info for a Package
npm view mongoose

 Updating Local Packages
npm outdated

npm update

DevDependencies
npm i jshint --save-dev

 Uninstalling a Package
npm uninstall pname
npm un pname
Working with Global Package


作者:cell006



npm x2 node

需要 登录 后方可回复, 如果你还没有账号请 注册新账号
相关文章