From 5b42cfe7ab44fa3021904f5c14a9a138073b333c Mon Sep 17 00:00:00 2001 From: kevintyj Date: Wed, 6 Dec 2023 19:17:41 +0530 Subject: [PATCH 1/4] docs: Migrate docs pm to npm from yarn --- apps/docs/.stylelintrc.js | 1 + apps/docs/README.md | 29 +++++++++++++++++------------ apps/docs/package.json | 2 +- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/apps/docs/.stylelintrc.js b/apps/docs/.stylelintrc.js index 11b6ffb32..2c7b52441 100644 --- a/apps/docs/.stylelintrc.js +++ b/apps/docs/.stylelintrc.js @@ -10,4 +10,5 @@ module.exports = { rules: { 'docusaurus/copyright-header': true, }, + ignoreFiles: ['**/build/**'], }; diff --git a/apps/docs/README.md b/apps/docs/README.md index 843042c6c..2fb280de0 100644 --- a/apps/docs/README.md +++ b/apps/docs/README.md @@ -6,24 +6,29 @@ This website is built using [Docusaurus 2](https://docusaurus.io/), a modern sta - stylex actual package, and then the @stylexjs/babel-plugin plugin in node_modules +In the project root directory (workspace) +```bash +$ npm build -w @stylexjs/stylex && npm build -w @stylexjs/babel-plugin +``` + ### Installation -``` -$ yarn +```bash +$ npm install ``` ### Local Development -``` -$ yarn start +```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 -``` -$ yarn build +```bash +$ npm run build ``` This command generates static content into the `build` directory and can be served using any static contents hosting service. @@ -32,14 +37,14 @@ This command generates static content into the `build` directory and can be serv Using SSH: -``` -$ USE_SSH=true yarn deploy +```bash +$ USE_SSH=true npm run deploy ``` Not using SSH: -``` -$ GIT_USER= yarn deploy +```bash +$ 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 to the `gh-pages` branch. @@ -48,6 +53,6 @@ If you are using GitHub pages for hosting, this command is a convenient way to b 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. -``` -$ yarn ci +```bash +$ npm run ci ``` diff --git a/apps/docs/package.json b/apps/docs/package.json index 6199d3f07..3bc72c7f2 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -13,7 +13,7 @@ "serve": "docusaurus serve", "write-translations": "docusaurus write-translations", "write-heading-ids": "docusaurus write-heading-ids", - "ci": "yarn lint && yarn format:diff", + "ci": "npm run lint && npm run format:diff", "lint": "eslint --cache \"**/*.js\" && stylelint \"**/*.css\"", "format": "prettier --config .prettierrc --write \"**/*.{js,jsx,ts,tsx,md,mdx}\"", "format:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,md,mdx}\"" From 7a6a6aff07f4d7a765a85edd53c738eab54dda84 Mon Sep 17 00:00:00 2001 From: kevintyj Date: Wed, 6 Dec 2023 19:21:52 +0530 Subject: [PATCH 2/4] typo: Add run to npm command --- apps/docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/README.md b/apps/docs/README.md index 2fb280de0..21e85663d 100644 --- a/apps/docs/README.md +++ b/apps/docs/README.md @@ -8,7 +8,7 @@ This website is built using [Docusaurus 2](https://docusaurus.io/), a modern sta In the project root directory (workspace) ```bash -$ npm build -w @stylexjs/stylex && npm build -w @stylexjs/babel-plugin +$ npm run build -w @stylexjs/stylex && npm run build -w @stylexjs/babel-plugin ``` ### Installation From c6c4ba2212f693575f9065a8de1f1485d7399963 Mon Sep 17 00:00:00 2001 From: kevintyj Date: Wed, 6 Dec 2023 19:27:04 +0530 Subject: [PATCH 3/4] docs: Add missing pacakge builds --- apps/docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/README.md b/apps/docs/README.md index 21e85663d..1a0eabc85 100644 --- a/apps/docs/README.md +++ b/apps/docs/README.md @@ -8,7 +8,7 @@ This website is built using [Docusaurus 2](https://docusaurus.io/), a modern sta In the project root directory (workspace) ```bash -$ npm run build -w @stylexjs/stylex && npm run build -w @stylexjs/babel-plugin +$ npm run build -w @stylexjs/stylex -w @stylexjs/shared -w @stylexjs/babel-plugin ``` ### Installation From e578653309c93ef33d8fdd219858ff30501b1c34 Mon Sep 17 00:00:00 2001 From: kevintyj Date: Wed, 6 Dec 2023 19:31:01 +0530 Subject: [PATCH 4/4] docs: Add eslint plugin to build README --- apps/docs/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/docs/README.md b/apps/docs/README.md index 1a0eabc85..0075ee84e 100644 --- a/apps/docs/README.md +++ b/apps/docs/README.md @@ -6,9 +6,8 @@ This website is built using [Docusaurus 2](https://docusaurus.io/), a modern sta - stylex actual package, and then the @stylexjs/babel-plugin plugin in node_modules -In the project root directory (workspace) ```bash -$ npm run build -w @stylexjs/stylex -w @stylexjs/shared -w @stylexjs/babel-plugin +$ npm run build -w @stylexjs/stylex -w @stylexjs/shared -w @stylexjs/eslint-plugin -w @stylexjs/babel-plugin ``` ### Installation