Port more content to website-next (#1435)
Summary: This builds upon https://github.com/facebook/yoga/pull/1433 and starts porting over and fixing some of the code in website-next. 1. Create a hero similar to current https://yogalayout.com hero 2. Start moving from `antd` and harcoded colors to [Infima](https://infima.dev/docs/getting-started/introduction/) primitives provided by Docusaurus 3. Replaced some more stock docusaurus assets, links, and text with the ones for Yoga. There is still a lot to do here (not the least, adding real content), but it's beginning to look like a website, and is already pretty snappy. Eventually I want to get SSR working correctly with Playground, which is still a little broken in the port. Pull Request resolved: https://github.com/facebook/yoga/pull/1435 Test Plan: **Gatsby Original** <img width="1795" alt="image" src="https://github.com/facebook/yoga/assets/835219/7670d53a-00a8-4146-a100-e4a05dd77488"> **New (light mode)** <img width="800" alt="image" src="https://github.com/facebook/yoga/assets/835219/ebe11d15-5f6f-445f-bcc8-9ec51ecfac62"> **New (dark mode)** <img width="800" alt="image" src="https://github.com/facebook/yoga/assets/835219/ca44a492-46df-410a-8303-baec3029ec49"> Reviewed By: yungsters Differential Revision: D50523462 Pulled By: NickGerleman fbshipit-source-id: 61b4610104f695a4e38a7d4bb6a0c2488bd6f89e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a20559063e
commit
92860077f9
@@ -22,6 +22,7 @@ const {
|
||||
|
||||
const {readFile, writeFile} = require('fs/promises');
|
||||
|
||||
const chalk = require('chalk');
|
||||
const glob = require('glob');
|
||||
const path = require('path');
|
||||
const which = require('which');
|
||||
@@ -132,10 +133,37 @@ function runBenchTask() {
|
||||
};
|
||||
}
|
||||
|
||||
function findExecutable(name, failureMessage) {
|
||||
const exec = which.sync(name, {nothrow: true});
|
||||
if (exec) {
|
||||
return exec;
|
||||
}
|
||||
|
||||
logger.error(chalk.bold.red(failureMessage));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
function tryFindExecutable(name, failureMessage) {
|
||||
const exec = which.sync(name, {nothrow: true});
|
||||
if (exec) {
|
||||
return exec;
|
||||
}
|
||||
|
||||
logger.warn(chalk.bold.yellow(failureMessage));
|
||||
return exec;
|
||||
}
|
||||
|
||||
function emcmakeGenerateTask() {
|
||||
return () => {
|
||||
const emcmake = which.sync('emcmake');
|
||||
const ninja = which.sync('ninja', {nothrow: true});
|
||||
const ninja = tryFindExecutable(
|
||||
'ninja',
|
||||
'Warning: Install Ninja (e.g. "brew install ninja") for faster builds',
|
||||
);
|
||||
const emcmake = findExecutable(
|
||||
'emcmake',
|
||||
'Error: Please install the emscripten SDK: https://emscripten.org/docs/getting_started/',
|
||||
);
|
||||
|
||||
const args = [
|
||||
'cmake',
|
||||
'-S',
|
||||
@@ -152,7 +180,10 @@ function emcmakeGenerateTask() {
|
||||
|
||||
function cmakeBuildTask(opts) {
|
||||
return () => {
|
||||
const cmake = which.sync('cmake');
|
||||
const cmake = findExecutable(
|
||||
'cmake',
|
||||
'Error: Please install CMake (e.g. "brew install cmake")',
|
||||
);
|
||||
const args = [
|
||||
'--build',
|
||||
'build',
|
||||
|
Reference in New Issue
Block a user