Facebook 推出的 JavaScript 包管理器发布了 Yarn 1.12.1 版本下载,提供 rpm、deb、tar.gz 等安装包,该版本进行了一些功能改进和新增加功能,同时修复已知的 bug。它能在 Debian、Ubuntu、CentOS、Fedora、RHEL、Arch Linux、macOS、Windows 等操作系统上运行。其中 Yarn 1.0 的发布时间是 2017 年 9 月,经过了十几次更新已经到了 Yarn 1.12.1 版本,其功能相当的完善,还在用 npm 的,赶紧考虑换 Yarn,因为它速度更快,不会像 npm 那样经常出现损坏,同样可以使用镜像。
Yarn 1.12.1更新详情 Ensures the engine check is ran before showing the UI for upgrade-interactive Restores Node v4 support by downgrading cli-table3 Prevents infinite loop when parsing corrupted lockfiles with unterminated strings Environment variables now have to start with YARN_ (instead of just contain it) to be considered Fixes the extensions option when used by resolveRequest Fixes handling of empty string entries for bin in package.json Adds support for basic auth for registries with paths, such as artifactory Adds 2FA (Two Factor Authentication) support to publish & alike Fixes how the files property is interpreted to bring it in line with npm Fixes Yarn invocations on Darwin when the yarn binary was symlinked Fixes require.resolve when used together with the paths option
下载链接
安装方法说明 1.针对Debian/Ubuntu系统 On Debian or Ubuntu Linux, you can install Yarn via our Debian package repository. You will first need to configure the repository: curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ rc main" | sudo tee /etc/apt/sources.list.d/yarn.list On Ubuntu 16.04 or below and Debian Stable, you will also need to configure the NodeSource repository to get a new enough version of Node.js. Then you can simply: sudo apt-get update && sudo apt-get install yarn Note: Ubuntu 17.04 comes with cmdtest installed by default. If you’re getting errors from installing yarn, you may want to run sudo apt remove cmdtest first. If using nvm you can avoid the node installation by doing: sudo apt-get install --no-install-recommends yarn Note: Due to the use of nodejs instead of node name in some distros, yarn might complain about node not being installed. A workaround for this is to add an alias in your .bashrc file, like so: alias node=nodejs. This will point yarn to whatever version of node you decide to use. Test that Yarn is installed by running: yarn --version 2.使用脚本安装方法(适用CentOS/Fedora/RHEL等版本) 1].Installation Script One of the easiest ways to install Yarn on macOS and generic Unix environments is via our shell script. You can install Yarn by running the following code in your terminal: curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --rc The installation process includes verifying a GPG signature. 2].Manual Install via tarball cd /opt wget https://yarnpkg.com/latest-rc.tar.gz tar zvxf latest.tar.gz # Yarn is now in /opt/yarn-[version]/ Before extracting Yarn, it is recommended that you verify the tarball using GPG: wget -qO- https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --import wget https://yarnpkg.com/latest.tar.gz.asc gpg --verify latest.tar.gz.asc # Look for "Good signature from 'Yarn Packaging'" in the output Test that Yarn is installed by running: yarn --version 3.试试简便命令 运行 sudo yum install yarn 命令或:sudo dnf install yarn 命令安装。 如果是在 Arch Linux 平台上则运行 pacman -S yarn 命令。
相关主题 |