-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into perf-outlines
- Loading branch information
Showing
114 changed files
with
7,663 additions
and
4,100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Contributing to React Scan | ||
|
||
First off, thanks for taking the time to contribute! ❤️ | ||
|
||
## Table of Contents | ||
|
||
- [Contributing to React Scan](#contributing-to-react-scan) | ||
- [Table of Contents](#table-of-contents) | ||
- [Project Structure](#project-structure) | ||
- [Development Setup](#development-setup) | ||
- [Contributing Guidelines](#contributing-guidelines) | ||
- [Commits](#commits) | ||
- [Pull Request Process](#pull-request-process) | ||
- [Development Workflow](#development-workflow) | ||
- [Getting Help](#getting-help) | ||
|
||
## Project Structure | ||
|
||
This is a monorepo containing several packages: | ||
|
||
- `packages/scan` - Core React Scan package | ||
- `packages/vite-plugin-react-scan` - Vite plugin for React Scan | ||
- `packages/extension` - VS Code extension | ||
|
||
## Development Setup | ||
|
||
1. **Clone and Install** | ||
```bash | ||
git clone https://github.com/aidenybai/react-scan.git | ||
cd react-scan | ||
pnpm install | ||
``` | ||
|
||
2. **Build all packages** | ||
```bash | ||
pnpm build | ||
``` | ||
|
||
3. **Development Mode** | ||
```bash | ||
# Run all packages in dev mode | ||
pnpm dev | ||
``` | ||
|
||
## Contributing Guidelines | ||
|
||
### Commits | ||
|
||
We use conventional commits to ensure consistent commit messages: | ||
|
||
- `feat:` New features | ||
- `fix:` Bug fixes | ||
- `docs:` Documentation changes | ||
- `chore:` Maintenance tasks | ||
- `test:` Adding or updating tests | ||
- `refactor:` Code changes that neither fix bugs nor add features | ||
|
||
Example: `fix(scan): fix a typo` | ||
|
||
### Pull Request Process | ||
|
||
1. Fork the repository | ||
2. Create your feature branch (`git checkout -b feat/amazing-feature`) | ||
3. Commit your changes using conventional commits | ||
4. Push to your branch | ||
5. Open a Pull Request | ||
6. Ask for reviews (@pivanov, @RobPruzan are your friends in this journey) | ||
|
||
### Development Workflow | ||
|
||
1. **TypeScript** | ||
- All code must be written in TypeScript | ||
- Ensure strict type checking passes | ||
- No `any` types unless absolutely necessary | ||
|
||
2. **Code Style** | ||
- We use Biome for formatting and linting | ||
- Run `pnpm format` to format code | ||
- Run `pnpm lint` to check for issues | ||
|
||
3. **Documentation** | ||
- Update relevant documentation | ||
- Add JSDoc comments for public APIs | ||
- Update README if needed | ||
|
||
## Getting Help | ||
- Check existing issues | ||
- Create a new issue | ||
|
||
<br /> | ||
|
||
⚛️ Happy coding! 🚀 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
import { build } from 'vite'; | ||
|
||
const __dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
|
||
async function buildWorker() { | ||
try { | ||
const entryPath = path.resolve( | ||
__dirname, | ||
'../../packages/scan/src/new-outlines/offscreen-canvas.worker.ts', | ||
); | ||
const outputPath = path.resolve(__dirname, 'dist/assets'); | ||
|
||
// biome-ignore lint/suspicious/noConsole: Intended debug output | ||
console.log('Building worker with entry:', entryPath); | ||
// biome-ignore lint/suspicious/noConsole: Intended debug output | ||
console.log('Output directory:', outputPath); | ||
|
||
await build({ | ||
build: { | ||
lib: { | ||
entry: entryPath, | ||
formats: ['iife'], | ||
fileName: () => 'offscreen-canvas.worker.js', | ||
name: 'OffscreenCanvasWorker', | ||
}, | ||
outDir: outputPath, | ||
emptyOutDir: false, | ||
copyPublicDir: false, | ||
assetsDir: 'assets', | ||
}, | ||
}); | ||
|
||
// biome-ignore lint/suspicious/noConsole: Intended debug output | ||
console.log('Worker build completed successfully!'); | ||
} catch (error) { | ||
// biome-ignore lint/suspicious/noConsole: Intended debug output | ||
console.error('Worker build failed:', error); | ||
process.exit(1); | ||
} | ||
} | ||
|
||
buildWorker(); |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.