Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Migrate docs pm to npm from yarn #67

Merged
merged 4 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/docs/.stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ module.exports = {
rules: {
'docusaurus/copyright-header': true,
},
ignoreFiles: ['**/build/**'],
};
28 changes: 16 additions & 12 deletions apps/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,28 @@ 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

```bash
$ npm run build -w @stylexjs/stylex -w @stylexjs/shared -w @stylexjs/eslint-plugin -w @stylexjs/babel-plugin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm run build --workspaces is all that's needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That builds all the packages/apps in the workspace, the documentation above only mentions the stylex packages and eslint plugin, so I only added builds that are required for docs to run (minimizes build time for first time contributors looking to only contribute to docs as size of monorepo increases). I could change it to build the entire workspace if that is the desired behavior 😀

```

### 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.
Expand All @@ -32,14 +36,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=<Your GitHub username> yarn deploy
```bash
$ GIT_USER=<Your GitHub username> 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.
Expand All @@ -48,6 +52,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
```
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}\""
Expand Down
Loading