Skip to content

Update copilot-instructions.md #264

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

Merged
merged 2 commits into from
Aug 12, 2025
Merged
Changes from 1 commit
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
23 changes: 7 additions & 16 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,14 @@ Orionrobots is a static website about robotics using Eleventy (11ty) static site
- Build assets and site manually:
- `docker compose run dist` -- builds webpack bundle.js, takes ~30 seconds
- `docker compose run build` -- builds full static site, takes ~3 minutes. Set timeout to 240+ seconds.
- Alternative native workflow:
```bash
npm install
npm run dist
npm run 11ty
```

### Development Server
- Run local development server:
- `docker compose up serve` -- starts Eleventy dev server on port 8081, **NEVER CANCEL** - builds then watches files. Set timeout to 300+ seconds for initial build.
- Alternative native: `npm run serve` -- starts Eleventy dev server directly
- Manual serving: After building, serve with Python: `cd _site && python3 -m http.server 8082`

### Testing Commands
- BDD integration tests:
- `docker compose run test` -- runs Cucumber.js tests with Playwright in containerized environment
- Alternative native: `npm run test:bdd` or `npm test` -- runs tests directly on host
- **Note**: Playwright installation may fail in some CI environments
- Tests require a running staging server to test against

Expand All @@ -49,7 +40,6 @@ Always test these key pages that are verified in CI:

### Build Verification
- Run `docker compose run dist && docker compose run build` and verify `_site` directory is created with content
- Alternative native: `npm run dist && npm run 11ty`
- Check that `_site/index.html` exists and contains proper HTML structure
- Verify `dist/bundle.js` exists and is approximately 330KB

Expand All @@ -68,6 +58,7 @@ dist/ -- Webpack build output (bundle.js)
docker-compose.yml -- Docker development environment setup
package.json -- npm dependencies and scripts
src/ -- Source files for Webpack
tests/staging -- Gherkin based BDD tests for website functionality
webpack.config.js -- Webpack configuration
```

Expand All @@ -79,16 +70,13 @@ webpack.config.js -- Webpack configuration
## Build Process Details

### Build Order (Critical)
1. **Webpack Build** (`docker compose run dist` or `npm run dist`): Creates `dist/bundle.js` with CSS and JS assets
2. **Eleventy Build** (`docker compose run build` or `npm run 11ty`): Processes markdown, creates HTML, copies assets to `_site/`
1. **Webpack Build** (`docker compose run dist`): Creates `dist/bundle.js` with CSS and JS assets
2. **Eleventy Build** (`docker compose run build`): Processes markdown, creates HTML, copies assets to `_site/`

### Timing Expectations
- Docker compose up: ~4-5 minutes for initial build and start (set 300+ second timeout)
- Docker dist build: ~30 seconds (set 60+ second timeout)
- Docker site build: ~3 minutes (**NEVER CANCEL** - set 240+ second timeout)
- Alternative native npm install: ~1 minute (standard timeout OK)
- Alternative native webpack dist: ~7 seconds (set 30+ second timeout)
- Alternative native Eleventy build: ~2.5 minutes (**NEVER CANCEL** - set 180+ second timeout)

### Known Build Warnings
- Sass deprecation warnings about @import rules (normal, build continues)
Expand Down Expand Up @@ -132,6 +120,9 @@ This creates properly structured content with frontmatter in `content/YYYY/MM/`
- CSS/JS: Add to `src/` and import in `src/index.js`
- Static files: Use Eleventy passthrough copy in `.eleventy.js`

### Adding scripts or utilities
- Ensure these are run through a docker compose command
Copy link
Preview

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

This guidance is vague and lacks specificity. Consider providing an example of how to run scripts through docker compose or reference existing patterns in the codebase.

Suggested change
- Ensure these are run through a docker compose command
- Add new scripts to the `.github/scripts/` directory.
- To run a script, use a Docker Compose command following the existing pattern. For example, to run a script called `my_script.sh`:
```bash
docker compose run base .github/scripts/my_script.sh [arguments]
  • Refer to the commands above (e.g., for new_post.sh) for additional patterns.

Copilot uses AI. Check for mistakes.


### Troubleshooting Build Issues
1. Clear containers and rebuild: `docker compose down && docker compose build --no-cache`
2. Clear build outputs: `docker compose run --rm base rm -rf _site dist`
Expand Down Expand Up @@ -162,4 +153,4 @@ This is a Jekyll-to-Eleventy migrated project (now fully Eleventy) with:
- Extensive robotics content and tutorials
- Apache hosting with custom htaccess rules

**CRITICAL REMINDER**: Use Docker Compose as the primary development method. Never cancel long-running builds - they can take 3-5+ minutes for initial setup.
**CRITICAL REMINDER**: Use Docker Compose as the primary development method. Never cancel long-running builds - they can take 3-5+ minutes for initial setup.