-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
7,707 additions
and
695 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[*.sass] | ||
indent_size = 2 | ||
indent_style = space |
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,43 @@ | ||
name: Build | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
env: | ||
AMO_JWT_ISSUER: "${{ secrets.AMO_JWT_ISSUER }}" | ||
AMO_JWT_SECRET: "${{ secrets.AMO_JWT_SECRET }}" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: "npm" | ||
|
||
- name: Install | ||
run: yarn install | ||
|
||
- name: Build chrome | ||
run: yarn run package:chrome | ||
|
||
- name: Build firefox-debug | ||
run: yarn run package:firefox-debug | ||
|
||
- name: Build firefox-release-unlisted | ||
run: yarn run package:firefox-release-unlisted | ||
|
||
- name: Build firefox-release-listed | ||
if: startsWith(github.event.ref, 'refs/tags/v') | ||
run: yarn run package:firefox-release-listed | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
if-no-files-found: error | ||
name: zips-xpis | ||
path: web-ext-artifacts/* |
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,7 @@ | ||
{ | ||
"extends": "@parcel/config-webextension", | ||
"transformers": { | ||
"url:*.svg": ["@parcel/transformer-svgo", "@parcel/transformer-raw"], | ||
"data-url:*.svg": ["@parcel/transformer-svgo", "@parcel/transformer-raw"] | ||
} | ||
} |
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,5 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} |
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,22 @@ | ||
{ | ||
// Enable the ESlint flat config support | ||
"eslint.experimental.useFlatConfig": true, | ||
// Disable the default formatter, use eslint instead | ||
"prettier.enable": false, | ||
"editor.formatOnSave": false, | ||
// Auto fix | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit", | ||
"source.organizeImports": "never" | ||
}, | ||
// Enable eslint for all supported languages | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact", | ||
"html", | ||
"json", | ||
"jsonc" | ||
] | ||
} |
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,15 @@ | ||
import antfu from '@antfu/eslint-config' | ||
|
||
export default antfu({ | ||
typescript: true, | ||
stylistic: { | ||
indent: 2, | ||
quotes: 'single', | ||
}, | ||
rules: { | ||
'no-console': 'warn', | ||
}, | ||
formatters: { | ||
css: true, | ||
}, | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; | ||
}; | ||
|
||
outputs = { self, nixpkgs }: | ||
let | ||
pkgs = import nixpkgs { | ||
system = "x86_64-linux"; | ||
}; | ||
in | ||
{ | ||
devShells.x86_64-linux.default = pkgs.mkShell { | ||
buildInputs = with pkgs; [ yarn nodejs ]; | ||
}; | ||
}; | ||
} |
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 @@ | ||
{ | ||
"name": "images-under-cursor", | ||
"type": "module", | ||
"version": "1.0.0", | ||
"private": true, | ||
"scripts": { | ||
"start": "parcel watch src/manifest.json --host localhost --config @parcel/config-webextension", | ||
"build": "parcel build src/manifest.json --config @parcel/config-webextension --no-content-hash --no-source-maps", | ||
"patch-manifest-for-firefox": "cp dist/manifest.json dist/manifest_.json && jq -s -c '(.[0] * .[1]) | (.background.scripts = [.background.service_worker]) | (del(.background.service_worker))' dist/manifest_.json src/manifest.firefox.json > dist/manifest.json && rm dist/manifest_.json", | ||
"package:chrome": "rm -rf dist && yarn run build && web-ext build --overwrite-dest --source-dir dist --filename chrome.zip", | ||
"package:firefox-debug": "rm -rf dist && yarn run build && yarn run patch-manifest-for-firefox && web-ext build --overwrite-dest --source-dir dist --filename firefox-debug.zip", | ||
"package:firefox-release-unlisted": "rm -rf dist && yarn run build && yarn run patch-manifest-for-firefox && web-ext sign --source-dir dist --use-submission-api --channel=unlisted --api-key=$AMO_JWT_ISSUER --api-secret=$AMO_JWT_SECRET", | ||
"package:firefox-release-listed": "rm -rf dist && yarn run build && yarn run patch-manifest-for-firefox && web-ext sign --source-dir dist --use-submission-api --channel=listed --api-key=$AMO_JWT_ISSUER --api-secret=$AMO_JWT_SECRET" | ||
}, | ||
"dependencies": { | ||
"@types/webextension-polyfill": "^0.10.7", | ||
"preact": "^10.20.1", | ||
"query-selector-shadow-dom": "^1.0.1", | ||
"webextension-polyfill": "^0.10.0" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^2.9.0", | ||
"@parcel/config-webextension": "^2.12.0", | ||
"@parcel/optimizer-data-url": "2.12.0", | ||
"@parcel/transformer-inline-string": "^2.12.0", | ||
"@parcel/transformer-raw": "^2.12.0", | ||
"@parcel/transformer-sass": "^2.12.0", | ||
"@parcel/transformer-svgo": "^2.0.0-nightly.1739", | ||
"@types/query-selector-shadow-dom": "^1.0.4", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-format": "^0.1.0", | ||
"parcel": "^2.12.0", | ||
"typescript": "^5.4.3", | ||
"web-ext": "^7.11.0" | ||
}, | ||
"alias": { | ||
"preact/jsx-dev-runtime": "preact/jsx-runtime" | ||
}, | ||
"@parcel/bundler-default": { | ||
"minBundles": 10000000, | ||
"minBundleSize": 3000, | ||
"maxParallelRequests": 20 | ||
} | ||
} |
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.