From 5c3a8f3953819d1b1f3154e25f4b08029a608ffe Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Thu, 7 Dec 2023 18:12:02 -0800 Subject: [PATCH] Update setup instructions (#95) * Update setup instructions * Remove stylex() use from examples --- .github/CONTRIBUTING.md | 3 +- .gitignore | 7 ++-- .prettierignore | 2 + apps/docs/README.md | 41 ++----------------- apps/docs/components/YouTube.js | 2 +- .../docs/api/configuration/babel-plugin.mdx | 8 ++-- .../docs/docs/learn/02-thinking-in-stylex.mdx | 2 +- apps/docs/package.json | 5 +-- apps/nextjs-example/app/page.tsx | 18 ++++---- apps/nextjs-example/typetests/test3.tsx | 1 - apps/rollup-example/index.js | 2 +- package-lock.json | 1 + package.json | 1 + 13 files changed, 29 insertions(+), 64 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 828ee061..82bd21b8 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -59,7 +59,8 @@ npm run build ## Documentation -First build the StyleX packages, then run the docs locally: +If necessary, first build the StyleX packages (`npm run build`), then start the +docs locally: ``` npm run start -w docs diff --git a/.gitignore b/.gitignore index f5b0fdf4..30af9c9c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,9 @@ *.log* +.build +.docusaurus +.stylex build coverage dist lib node_modules -.turbo -apps/docs/.stylex/* -apps/rollup-example/.build -apps/webpack-example/.build diff --git a/.prettierignore b/.prettierignore index 2bc48a0f..1b1bd751 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,7 @@ .build +.docusaurus .next +.stylex build coverage lib diff --git a/apps/docs/README.md b/apps/docs/README.md index 9d0b858b..8c22d7d4 100644 --- a/apps/docs/README.md +++ b/apps/docs/README.md @@ -1,36 +1,11 @@ -# Website +# StyleX website This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. -### build stylex packages +## Local Development -- stylex actual package, and then the @stylexjs/babel-plugin plugin in node_modules - -```bash -$ npm run build -w @stylexjs/stylex -w @stylexjs/shared -w @stylexjs/eslint-plugin -w @stylexjs/babel-plugin -``` - -### Installation - -```bash -$ npm install -``` - -### Local Development - -```bash -$ npm start -``` - -This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. - -### Build - -```bash -$ npm run build -``` - -This command generates static content into the `build` directory and can be served using any static contents hosting service. +Local development should be performed from the monorepo root. +Please see the monorepo's CONTRIBUTING.md file for more instructions. ### Deployment @@ -47,11 +22,3 @@ $ GIT_USER= npm run deploy ``` If you are using GitHub pages for hosting, this command is a convenient way to build the website and push it to the `gh-pages` branch. - -### Continuous Integration - -Some common defaults for linting/formatting have been set for you. If you integrate your project with an open source Continuous Integration system (e.g. Travis CI, CircleCI), you may check for issues using the following command. - -```bash -$ npm run ci -``` diff --git a/apps/docs/components/YouTube.js b/apps/docs/components/YouTube.js index ff8b63e5..9d4a2eff 100644 --- a/apps/docs/components/YouTube.js +++ b/apps/docs/components/YouTube.js @@ -32,12 +32,12 @@ export default function YouTube({width: _w, height: _h, src, title}) {