zoukankan      html  css  js  c++  java
  • node模块系统常用命令

    node模块系统常用命令

    命令

    示例

    备注

    安装模块

    npm install commander

    最新版本

    npm install commander@1.0.0

    指定版本

    npm install commander@1.0.x

    支持通配符,代表1.0版本下的最新补丁

    npm install commander@""

    支持版本范围描述,代表最新版本

    npm install commander@"*"

    支持版本范围描述,代表最新版本

    npm install commander@"=1.1.0"

    指定版本

    npm install commander@"~1.0.0"

    大于或等于指定版本,小于下一个主版本(2.0.0

    npm install commander@">1.0.0"

    npm install commander@"<1.1.0"

    npm install commander@">=1.0.0 <1.1.0"

    npm install commander@"1.0.0 - 1.1.0 "

    npm install commander@"<=1.1.0 ||>=1.1.0"

    npm intall https://github.com/.../master

    直接从git 地址安装

    npm install commander -g

    安装到全局目录

    查看模块

    npm ls -g

    查看全局安装的所有模块及其依赖

    npm ls

    查看当前目录下的所有模块及其依赖(需切换到当前目录)

    npm outdated (-g)

    查看当前目录下过时的模块( 全局)

    更新模块

    npm update commander (-g)

    缷载模块

    npm rm commander

    关联模块

    cd link-module

    npm link

    cd -commander-module

    npm link link-module

    分两步:

    1.       设定某个模块可关联(全局可访问)

    2.       在当前模块下,关联一个可关联的模块

  • 相关阅读:
    AMap公交线路查询
    AMap行政区查询服务
    使用JavaScript的Join方法
    获取layer.open弹出层的返回值
    MVC项目中WebViewPage的实战应用
    ASP.NET管道
    Android接收系统广播
    python字符串转换成数字
    mysql缓存
    两个矩阵对应位置的数据相加,并返回一个矩阵
  • 原文地址:https://www.cnblogs.com/markhe/p/5635147.html
Copyright © 2011-2022 走看看