Common NPM & Gem summaries

Source: Internet
Author: User

NPM Install <name> installation Nodejs Dependency Pack

For example, NPM install Express installs the latest version of Express by default, or you can install the specified version by adding the version number later, such as NPM install [email protected]

NPM Install <name>-G packages are installed in the global environment

But in the code, the direct way through require () is that there is no way to call a globally installed package. The global installation is for the command line, as if the Vmarket is installed globally, you can run the VM command directly on the command line

NPM install <name>--save to write information to Package.json

If you have a Package.json file in the project path, you can use the NPM install method directly to install all the dependent packages based on the dependencies configuration

When this code is submitted to GitHub, it is not necessary to commit the Node_modules folder.

NPM init will guide you through the creation of a Package.json file, including name, version, author information, etc.

NPM Remove <name> Remove

NPM Update <name> Update

NPM LS Lists all the packages that are currently installed

NPM root View the installation path for the current package

NPM root-g View the installation path for a global package

NPM help helps, if you want to view the help of the install command separately, you can use the NPM helper install

--------------------------------------------------------------------------------------------------------

Gem-v #gem版本
Gem Update #更新所有包
Gem Update--system #更新RubyGems软件
Gem install Rake #安装rake, from a local or remote server
Gem install rake--remote #安装rake from a remote server
Gem install watir-v (or--version) 1.6.2 #指定安装版本的
Gem Uninstall Rake #卸载rake包
Gem List D #列出本地以d打头的包
Gem Query-n ' [0-9] '--local #查找本地含有数字的包
Gem Search Log--both #从本地和远程服务器上查找含有log字符串的包
Gem Search Log--remoter #只从远程服务器上查找含有log字符串的包
Gem Search-r log #只从远程服务器上查找含有log字符串的包
Gem Help #提醒式的帮助
Gem Help install #列出install命令 assistance
Gem Help examples #列出gem命令使用一些例子
Gem Build Rake.gemspec #把rake. Gemspec compiled into Rake.gem
Gem Check-v Pkg/rake-0.4.0.gem #检测rake是否有效
Gem Cleanup #清除所有包旧版本, keep the latest version
Gem Contents Rake #显示rake包中所包含的文件
Gem Dependency rails-v 0.10.1 #列出与rails相互依赖的包
Gem Environment #查看gem的环境

Gem sources-Remove URL #移除URL源
Gem Sources-a URL #添加新的URL源
Gem Sources-l #查看当前源列表

 

Common NPM & Gem summaries

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.