未加星标

Yarnrc released

字体大小 | |
[系统(windows) 所属分类 系统(windows) | 发布者 店小二04 | 时间 2016 | 作者 红领巾 ] 0人收藏点击收藏
yarnrc

Switch between different .yarnrc files with ease and grace.

Overview

This is a adapted version of npmrc(npmrc) to work with the new package manager released by Facebook called Yarn. If you use a private npm registry, you know the pain of switching between a bunch of different .yarnrc files and manually managing symlinks. Let that be a problem no more! yarnrc is here to save the day, by making it dead simple to switch out your .yarnrc with a specific named version. It also tries to protect you from your own stupid self by making sure you don't accidentally overwrite an .yarnrc that you actually want to keep.

Installation npm install -g yarnrc Usage ~ yarnrc --help yarnrc Switch between different .yarnrc files with ease and grace. Usage: yarnrc list all profiles yarnrc [name] change yarnrc profile (uses fuzzy matching) yarnrc -c [name] create a new yarnrc profile called name yarnrc -r [registry] use an npm mirror Available mirrors for yarnrc -r: au - Australian registry mirror eu - European registry mirror cn - Chinese registry mirror default - Default registry Initialisation

Calling yarnrc without arguments creates an ~/.yarnrcs/ directory if it doesn't exist, and copies your current ~/.yarnrc as the 'default' .yarnrc profile.

~ yarnrc Creating /Users/conrad/.yarnrcs Making /Users/conrad/.yarnrc the default yarnrc file Activating .yarnrc 'default' Create a new .yarnrc profile ~ yarnrc -c newprofile Removing old .yarnrc (/home/rvagg/.yarnrcs/default) Activating .yarnrc 'newprofile'

A blank profile will be created. To point your profile to a non-default registry:

~ npm config set registry http://npm.nodejs.org.au:5984/registry/_design/app/_rewrite

Then use npm adduser or npm login to authenticate with the new profile.

List available .yarnrc profiles ~ yarnrc Available yarnrcs: * default work Switch to a specific .yarnrc ~ yarnrc work Removing old .yarnrc (/Users/conrad/.yarnrcs/default) Activating .yarnrc 'work'

You can also pass only the first few characters of a profile and yarnrc will autocomplete the profile's name.

~ yarnrc def Removing old .yarnrc (/Users/conrad/.yarnrcs/work) Activating .yarnrc 'default'

yarnrc <name> will also go to some lengths to make sure you don't overwrite anything you might care about:

~ yarnrc default Removing old .yarnrc (/Users/conrad/.yarnrcs/work) Activating .yarnrc 'default' ~ yarnrc default Current .yarnrc (/Users/conrad/.yarnrc) is already 'default' (/Users/conrad/.yarnrcs/default) ~ rm ~/.yarnrc ~ touch ~/.yarnrc ~ yarnrc default Current .yarnrc (/Users/conrad/.yarnrc) is not a regular file, not removing it ~ rm ~/.yarnrc ~ yarnrc default Activating .yarnrc 'default' Note For windows Users

You may have to run yarnrc in a shell (cmd, PowerShell, Git Bash, etc) with elevated (Administrative) privileges to get it to run.

Environment Variables YARNRC_STORE - Path to directory of profiles. Default: ~/.yarnrcs/ YARNRC - Path to the yarnrc file used by npm. Default: ~/.yarnrc Known npm registry Mirrors

For your convenience, you can change registries easily using the -r flag. Currently we provide aliases for:

Australia : yarnrc -r au Europe : yarnrc -r eu China : yarnrc -r cn Switching registry example ~ npm -r eu Using eu registry ~ npm info yarnrc npm http GET http://registry.npmjs.eu/yarnrc ^C ~ npm -r default Using default registry ~ npm info yarnrc npm http GET https://registry.npmjs.org/yarnrc ^C License

3-clause BSD. A copy is included with the source.

Contact GitHub (Vitorcamacho) Twitter ( @vitorcamachooo ) Email ( [email protected] ) Awesome People deoxxa "the creator" of npmrc(github) Jaime "the binary wizard" Pillora (github) Tim "two hands" Oxley (github) Jakob "fastest blur in the west" Krigovsky (github) Rod "the destroyer" Vagg (github) Eugene "ludicrous gibs" Asiedu (github)

本文系统(windows)相关术语:三级网络技术 计算机三级网络技术 网络技术基础 计算机网络技术

分页:12
转载请注明
本文标题:Yarnrc released
本站链接:http://www.codesec.net/view/483351.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(windows) | 评论(0) | 阅读(145)