Skip to content
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
74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint

test:
name: Test
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Install dependencies
run: npm ci

- name: Install Playwright Chromium
run: npx playwright install chromium --with-deps

- name: Run tests
run: npm test

build:
name: Build
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4

- name: Build extension package
run: |
mkdir -p dist
zip -r dist/read-aloud-extension.zip \
manifest.json \
icons/ \
popup/ \
scripts/ \
LICENSE \
README.md

- name: Verify package contents
run: unzip -l dist/read-aloud-extension.zip

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: read-aloud-extension
path: dist/read-aloud-extension.zip
retention-days: 30
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
node_modules/
dist/
package-lock.json

# OS artifacts
.DS_Store
Thumbs.db

# Editor directories
.vscode/
.idea/
*.swp
*.swo

# Logs
*.log
84 changes: 84 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Contributing to Read Aloud Chrome Extension

Thank you for your interest in contributing! This document provides guidelines for contributing to the Read Aloud Chrome Extension.

## How to Report Bugs

1. Check the [existing issues](https://github.com/dhaatrik/ReadAloud_ChromeExtension/issues) to see if the bug has already been reported.
2. If not, [open a new issue](https://github.com/dhaatrik/ReadAloud_ChromeExtension/issues/new) with:
- A clear and descriptive title.
- Steps to reproduce the bug.
- Expected behavior vs. actual behavior.
- Your browser version and OS.

## How to Suggest Features

Open a [new issue](https://github.com/dhaatrik/ReadAloud_ChromeExtension/issues/new) with the **feature request** label. Include:
- A clear description of the feature.
- Why it would be useful.
- Any relevant examples or mockups.

## Development Setup

1. **Clone the repository:**
```bash
git clone https://github.com/dhaatrik/ReadAloud_ChromeExtension.git
cd ReadAloud_ChromeExtension
```

2. **Install dependencies** (for running tests):
```bash
npm install
```

3. **Load the extension in Chrome:**
- Navigate to `chrome://extensions`.
- Enable **Developer mode**.
- Click **Load unpacked** and select the project directory.

4. **Run the test suite:**
```bash
npm test
```

## Pull Request Process

1. **Fork** the repository and create a new branch from `main`:
```bash
git checkout -b feature/your-feature-name
```

2. **Make your changes.** Follow the code style conventions below.

3. **Test your changes** to ensure nothing is broken:
```bash
npm test
```

4. **Commit** with a clear, descriptive message:
```bash
git commit -m "Add: brief description of change"
```

5. **Push** your branch and open a Pull Request against `main`.

## Code Style

- Use **vanilla JavaScript** (no frameworks or transpilers).
- Use `const` and `let` — never `var`.
- Use JSDoc comments for all public functions.
- Keep functions small and focused.
- Follow the existing code structure and naming conventions.

## Project Structure

```
scripts/ → Core extension logic (background, content, popup, utils)
popup/ → Popup UI (HTML + CSS)
icons/ → Extension icons
test/ → QUnit test suite with mocks
```

## License

By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE).
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 Dhaatrik Chowdhury
Copyright (c) 2026 Dhaatrik Chowdhury

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
14 changes: 0 additions & 14 deletions PR_DESCRIPTION.md

This file was deleted.

Loading
Loading