非常教程

Yarn参考手册

CLI

yarn test

运行包定义的测试脚本。

yarn test

如果您在包中定义了一个scripts对象,则此命令将运行指定的test脚本。

例如,如果在你的包有一个bash脚本scripts/test

#!/bin/bash

echo "Hello, world!"

并在你的package.json运行下面代码:

{
  "name": "my-tribute-package",
  "version": "1.0.0",
  "description": "This is not the best package in the world, this is just a tribute.",
  "main": "index.js",
  "author": "Yarn Contributor",
  "license": "MIT",
  "scripts": {
    "test": "scripts/test"
  }
}

那么运行yarn test会产生:

$ yarn test
yarn test v0.15.1
$ "./scripts/test"
Hello, world!
✨ Done in 0.17s.

yarn run test

yarn test也是一个yarn run test的捷径。

Yarn

Apache Hadoop YARN (Yet Another Resource Negotiator,另一种资源协调者)是一种新的 Hadoop 资源管理器,它是一个通用资源管理系统,可为上层应用提供统一的资源管理和调度,它的引入为集群在利用率、资源统一管理和数据共享等方面带来了巨大好处。

主页 https://yarnpkg.com/
源码 https://github.com/yarnpkg/yarn
发布版本 1.3.2

Yarn目录