diff --git a/README.md b/README.md index 00972de2..2e6e5c50 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Yoga is an embeddable and performant flexbox layout engine with bindings for multiple languages. - ## Building + Yoga's main implementation targets C++ 20 with accompanying build logic in CMake. A wrapper is provided to build the main library and run unit tests. ```sh @@ -14,8 +14,6 @@ While not required, this script will use [ninja](https://ninja-build.org/) if it Yoga is additionally part of the [vcpkg](https://github.com/Microsoft/vcpkg/) collection of ports maintained by Microsoft and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. - - ## Adding Tests Many of Yoga's tests are automatically generated, using HTML fixtures describing node structure. These are rendered in Chrome to generate an expected layout result for the tree. New fixtures can be added to `gentest/fixtures`. @@ -27,9 +25,10 @@ Many of Yoga's tests are automatically generated, using HTML fixtures describing ``` To generate new tests from added fixtures: -1. Run `bundle install` in the `gentest` directory to install dependencies of the test generator. -2. Run `ruby gentest.rb` in the `gentest` directory. +1. Ensure you have [yarn](https://yarnpkg.com/) installed. +2. Run `yarn install` to install dependencies for the test generator. +3. Run `yarn gentest` in the `yoga` directory. ## Debugging diff --git a/package.json b/package.json index bab221a2..e5121d61 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "scripts": { "lint": "eslint .", "lint:fix": "eslint . --fix", - "tsc": "yarn workspaces run tsc" + "tsc": "yarn workspaces run tsc", + "gentest": "node --loader=babel-register-esm gentest/gentest-driver.ts" }, "workspaces": [ "javascript", @@ -15,6 +16,7 @@ "devDependencies": { "@typescript-eslint/eslint-plugin": "^5.30.5", "@typescript-eslint/parser": "^5.30.5", + "babel-register-esm": "^1.2.5", "eslint": "^8.30.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-jest": "^27.1.7",