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
26 changes: 23 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: "Setup Node 24"
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 24

Expand All @@ -41,12 +41,32 @@ jobs:
- name: "Verify Version"
if: ${{ github.event_name == 'release' }}
run: |
yq -e '.version | test("${{ inputs.version }}")' package.json
jq -e '.version == "${{ inputs.version }}"' package.json
cat -n package.json

- name: "Build"
run: npm run package

- name: "Validate"
if: ${{ github.event_name == 'release' }}
working-directory: .output
run: |
ls -lAh .
jq -e '.version == "${{ github.event.release.tag_name }}"' firefox-mv3/manifest.json
echo "::group::chrome-mv3"
ls -lAh chrome-mv3
echo "::endgroup::"
echo "::group::chrome-mv3/manifest.json"
jq . chrome-mv3/manifest.json
echo "::endgroup::"
jq -e '.version == "${{ github.event.release.tag_name }}"' firefox-mv3/manifest.json
echo "::group::firefox-mv3"
ls -lAh firefox-mv3
echo "::endgroup::"
echo "::group::firefox-mv3/manifest.json"
jq . firefox-mv3/manifest.json
echo "::endgroup::"

- name: "Upload to Actions"
uses: actions/upload-artifact@v7
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: "Draft Release Action"
id: draft
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: "Checkout Configs"
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: cssnr/configs
ref: master
Expand All @@ -46,7 +46,7 @@ jobs:
file: .configs/labels/labels.yaml

- name: "Labeler"
uses: actions/labeler@v6
uses: actions/labeler@v7
with:
sync-labels: true
configuration-path: .configs/labels/labeler.yaml
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: "Setup Node 24"
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 24

Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
run: |
ls -lAh .
stat "${{ env.PACKAGE_NAME }}-${{ github.event.release.tag_name }}-chrome.zip"
yq -e '.version | test("${{ github.event.release.tag_name }}")' chrome-mv3/manifest.json
jq -e '.version == "${{ github.event.release.tag_name }}"' chrome-mv3/manifest.json
echo "::group::chrome-mv3"
ls -lAh chrome-mv3
echo "::endgroup::"
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
run: |
ls -lAh .
stat "${{ env.PACKAGE_NAME }}-${{ github.event.release.tag_name }}-sources.zip"
yq -e '.version | test("${{ github.event.release.tag_name }}")' firefox-mv3/manifest.json
jq -e '.version == "${{ github.event.release.tag_name }}"' firefox-mv3/manifest.json
echo "::group::firefox-mv3"
ls -lAh firefox-mv3
echo "::endgroup::"
Expand All @@ -140,7 +140,9 @@ jobs:
jq . amo-metadata.json
echo "::endgroup::"

# NOTE: This installs web-ext using npx
- name: "Sign Mozilla Addon"
# https://extensionworkshop.com/documentation/develop/web-ext-command-reference/#web-ext-sign
env:
FIREFOX_API_KEY: ${{ secrets.FIREFOX_API_KEY }}
FIREFOX_API_SECRET: ${{ secrets.FIREFOX_API_SECRET }}
Expand Down Expand Up @@ -187,7 +189,7 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
persist-credentials: false

Expand All @@ -208,7 +210,7 @@ jobs:

- name: "Commit Action"
id: commit
uses: suzuki-shunsuke/commit-action@f12e2d628a4ab72dcefe7890ae07e8dbf1e201b9 # v0.1.1
uses: suzuki-shunsuke/commit-action@v1.0.0
with:
branch: master
#repository: ${{ github.repository }}
Expand Down Expand Up @@ -252,7 +254,7 @@ jobs:

- name: "Send Notification"
if: ${{ !cancelled() }}
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
description: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
2 changes: 2 additions & 0 deletions .ncurc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
reject:
- typescript
43 changes: 43 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Agent Guide

Web Extension to add a New Tab page focused on Bookmarks, Top Sites, and GitHub Repos and Issues/Pulls.

- Chrome + Firefox + Firefox Android all using MV3
- WXT (https://wxt.dev/) Framework https://github.com/wxt-dev/wxt
- TypeScript 6 with Vue 3.5
- Bootstrap 5.3 and FontAwesome

## Project Structure

IMPORTANT: Both `useOptions()` and `getOptions()` ALWAYS have DEFAULT values set!

### Files

- `wxt.config.ts` - WXT Config and Extension Manifest
- `src/app.config.ts` - WXT Application Runtime Configuration
- `src/entrypoints/background/index.ts` Background Service Worker
- `src/entrypoints/content/index.ts` Content Script Entrypoint
- `src/assets/css/styles.scss` - Main SCSS styles
- `src/main.ts` - Imported by all `src/entrypoints/*/main.ts` files

### Directories

- `src` - Source directory for the web extension, WXT Framework.
- `src/entrypoints/**` - WXT entrypoints
- `src/locales` - YAML locale files using `@wxt-dev/i18n`
- `src/components` - Vue components
- `src/directives` - Vue directives

## Commands

ALWAYS use the `npm run *` command NEVER pipe output into arbitrary truncation commands.

| Command | What it does |
| ------------------ | --------------------------------- |
| `npm run build` | `wxt build` to `.output` |
| `npm run build:ff` | build Firefox only (faster) |
| `npm run clean` | `rm -rf .output` |
| `npm run lint` | `npx eslint src` ESLint |
| `npm run tsc` | `vue-tsc --noEmit` TS Check |
| `npm run prepare` | `wxt prepare` Generate i18n Types |
| `npm run prettier` | ALWAYS RUN AFTER EDITING FILES |
Loading
Loading