Node学习(二)--npm


  1. 安装js库

    npm install xxx 将库文件放在当前路径

    npm install xxx -g 将库文件放在系统路径

    npm install xxx --save  安装依赖包

  2. npm config ls -l 查看npm安装路径

    userconfig = "/root/.npmrc"

  3. 修改npm 源

        npm config set registry https://registry.npm.taobao.org  

       访问 https://npm.taobao.org/  安装 cnpm

        npm install -g cnpm --registry=https://registry.npm.taobao.org

       cnpm install  libxmljs

  4. npm安装以及离线安装

     http://www.cnblogs.com/laozhbook/p/npm_help.html 

 


你可能感兴趣的:(nodejs)