mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-29 00:42:30 +00:00
docs(ai): update quickstart and contributing (agent)
- Update `README.md`: - Change `npm install` to `npm ci` for consistent setup. - Add "Quick Reference" section for common commands. - Explicitly label the video post example as "Quickstart: Send your first video post" and refine intro text. - Correct `npm run format` description. - Update `CONTRIBUTING.md`: - Clarify `npm run format` targets. - Minor refinements to "Submitting a Pull Request" and "Agent PR Conventions" sections. - Verified all documentation matches current codebase state. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
708c46f72f
commit
7b9e08de9c
2 files changed
+13
-6
No files matched your search
+3
-2
@@ -35,6 +35,7 @@ If we later introduce **dual-licensing** options (e.g., commercial licenses for
|
||||
## Agent PR Conventions
|
||||
|
||||
Automated agents contributing to this repository should follow these rules:
|
||||
|
||||
- **Atomic Commits**: Keep changes small, focused, and self-contained.
|
||||
- **Descriptive Titles**: Use clear, semantic titles (e.g., `fix(ui): resolve upload modal overflow`).
|
||||
- **Commit Messages**: Use the convention `type(scope): description (agent)` (e.g., `fix(ai): formatting (agent)` or `docs(ai): update quickstart (agent)`).
|
||||
@@ -46,7 +47,7 @@ Automated agents contributing to this repository should follow these rules:
|
||||
|
||||
1. Fork the repository and create a new branch from `main`.
|
||||
2. Make your changes, adding tests if applicable.
|
||||
3. Run `npm run format`, `npm run lint`, and unit tests (e.g. `npm run test:unit` or a shard like `npm run test:unit:shard1`) to ensure quality.
|
||||
3. Run `npm run format`, `npm run lint`, and unit tests (e.g. `npm run test:unit` or a shard like `npm run test:unit:shard1`) to ensure quality before pushing.
|
||||
4. (Optional) Run `npm run test:visual` if you made UI changes.
|
||||
5. (Optional) Run domain-specific tests if relevant (e.g., `npm run test:dm:unit` for Direct Messages).
|
||||
6. Push your branch and open a Pull Request against the `main` branch.
|
||||
@@ -132,7 +133,7 @@ To set up the project locally:
|
||||
npm run format
|
||||
npm run lint
|
||||
```
|
||||
*Note: `npm run format` currently only targets CSS, HTML, and Markdown files.*
|
||||
*Note: `npm run format` currently targets CSS, HTML, Markdown, and Tailwind config files.*
|
||||
|
||||
5. **Git Hooks (Optional)**:
|
||||
We provide a script to set up a git pre-commit hook that runs linting and CSS builds automatically before you commit.
|
||||
|
||||
@@ -166,6 +166,12 @@ To run **bitvid** locally:
|
||||
|
||||
_Note: If you prefer manual steps, you can run `npm run build` followed by `npx serve` or `python -m http.server 8000`._
|
||||
|
||||
#### Quick Reference
|
||||
|
||||
- **Run unit tests**: `npm run test:unit`
|
||||
- **Format code**: `npm run format`
|
||||
- **Lint code**: `npm run lint`
|
||||
|
||||
### Dev Container
|
||||
|
||||
This project includes a `.devcontainer` configuration. If you use VS Code, you can open the project in a container to get a pre-configured environment with all dependencies installed.
|
||||
@@ -222,9 +228,9 @@ To quickly view the location of these artifacts:
|
||||
|
||||
Use these artifacts to inspect the UI state at the moment of failure and diagnose rendering issues or regressions.
|
||||
|
||||
### Send your first video post
|
||||
### Quickstart: Send your first video post
|
||||
|
||||
Use the event builders in `js/nostrEventSchemas.js` (the source of truth for all event definitions) to construct valid video notes. See [`docs/nostr-event-schemas.md`](docs/nostr-event-schemas.md) for full schema documentation.
|
||||
To programmatically publish videos, use the event builders in `js/nostrEventSchemas.js` (the source of truth for all event definitions) to construct valid video notes. See [`docs/nostr-event-schemas.md`](docs/nostr-event-schemas.md) for full schema documentation.
|
||||
|
||||
```javascript
|
||||
import { buildVideoPostEvent } from "./js/nostrEventSchemas.js";
|
||||
@@ -279,7 +285,7 @@ package scripts to keep formatting, linting, and generated output consistent:
|
||||
- **Core scripts:**
|
||||
|
||||
```bash
|
||||
npm run format # normalize CSS/HTML/JS/MD sources with Prettier + tailwindcss plugin
|
||||
npm run format # normalize CSS/HTML/MD/Config sources with Prettier + tailwindcss plugin
|
||||
npm run lint:css # enforce design token usage and guard against raw hex colors
|
||||
npm run build # run the Tailwind build locally (output remains gitignored)
|
||||
```
|
||||
@@ -308,7 +314,7 @@ commands from the repo root:
|
||||
1. Install dependencies (only required after cloning or when packages change):
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm ci
|
||||
```
|
||||
|
||||
2. Rebuild the Tailwind bundle for local verification (the output stays
|
||||
|
||||
Reference in new issue
Block a user