mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-06 15:38:53 -05:00
Update README.md
This commit is contained in:
parent
01df72a115
commit
f74874d656
@ -129,3 +129,42 @@ npm run deploy
|
|||||||
## API Integration
|
## API Integration
|
||||||
|
|
||||||
The video editor interfaces with MediaCMS through a set of API endpoints for retrieving and saving video edits.
|
The video editor interfaces with MediaCMS through a set of API endpoints for retrieving and saving video edits.
|
||||||
|
|
||||||
|
Sure! Here's your updated `README.md` section with a new **"Code Formatting"** section using Prettier. I placed it after the "Development" section to keep the flow logical:
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Code Formatting
|
||||||
|
|
||||||
|
To automatically format all source files using [Prettier](https://prettier.io):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Format all code in the src directory
|
||||||
|
npx prettier --write src/
|
||||||
|
```
|
||||||
|
|
||||||
|
Or for specific file types:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx prettier --write "client/src/**/*.{js,jsx,ts,tsx,json,css,scss,md}"
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also add this as a script in `package.json`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
"scripts": {
|
||||||
|
"format": "prettier --write client/src/"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Then run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
yarn format
|
||||||
|
# or
|
||||||
|
npm run format
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Let me know if you'd like to auto-format on commit using `lint-staged` + `husky`.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user