Compare commits

...

4 Commits

Author SHA1 Message Date
Bauke 5dfdd73cf5
Update public directory paths for Vite. 2023-03-26 14:33:17 +02:00
Bauke 75eddf0e17
Fix linting issues. 2023-03-26 14:33:08 +02:00
Bauke 2e1c7edfa1
Change package to ES module. 2023-03-26 14:32:57 +02:00
Bauke 6383e77609
Update dependencies. 2023-03-26 14:32:16 +02:00
8 changed files with 1749 additions and 2209 deletions

View File

@ -1,5 +1,6 @@
{
"private": true,
"type": "module",
"scripts": {
"start": "vite build -m development --watch",
"start:chromium": "VITE_BROWSER=chromium pnpm start",
@ -15,36 +16,36 @@
"@holllo/preact-components": "^0.2.3",
"htm": "^3.1.1",
"modern-normalize": "^1.1.0",
"preact": "^10.11.0",
"preact": "^10.13.1",
"webextension-polyfill": "^0.10.0"
},
"devDependencies": {
"@preact/preset-vite": "^2.4.0",
"@types/babel__core": "^7.1.19",
"@types/webextension-polyfill": "^0.9.1",
"ava": "^4.3.3",
"c8": "^7.12.0",
"postcss": "^8.4.16",
"sass": "^1.55.0",
"stylelint": "^14.12.1",
"stylelint-config-standard-scss": "^5.0.0",
"@preact/preset-vite": "^2.5.0",
"@types/babel__core": "^7.20.0",
"@types/webextension-polyfill": "^0.10.0",
"ava": "^5.2.0",
"c8": "^7.13.0",
"postcss": "^8.4.21",
"sass": "^1.60.0",
"stylelint": "^15.3.0",
"stylelint-config-standard-scss": "^7.0.1",
"trash-cli": "^5.0.0",
"ts-node": "^10.9.1",
"typescript": "^4.8.3",
"vite": "^3.1.3",
"vite-plugin-web-extension": "^1.4.4",
"web-ext": "^7.2.0",
"xo": "^0.52.3"
"typescript": "^5.0.2",
"vite": "^4.2.1",
"vite-plugin-web-extension": "^3.0.2",
"web-ext": "^7.6.0",
"xo": "^0.53.1"
},
"ava": {
"extensions": [
"ts"
],
"extensions": {
"ts": "module"
},
"files": [
"tests/**/*.test.ts"
],
"require": [
"ts-node/register"
"nodeArguments": [
"--loader=ts-node/esm"
],
"snapshotDir": "tests/snapshots"
},
@ -65,7 +66,6 @@
"files": "tests/**/*.test.ts",
"rules": {
"@typescript-eslint/triple-slash-reference": "off",
"import/extensions": "off",
"no-await-in-loop": "off"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -71,17 +71,22 @@ export async function contextClicked(
let url: string | undefined;
switch (id) {
case 'queue-add-new-link':
case 'queue-add-new-link': {
text = info.linkText;
url = info.linkUrl;
break;
case 'queue-add-new-link-tab':
}
case 'queue-add-new-link-tab': {
text = tab?.title;
url = info.pageUrl;
break;
default:
}
default: {
console.warn(`Encountered unknown context menu ID: ${id}`);
return;
}
}
if (url === undefined) {

View File

@ -15,7 +15,7 @@ export default function createManifest(
};
const icons = {
128: 'assets/queue.png',
128: 'queue.png',
};
manifest.icons = icons;

View File

@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Queue</title>
<link rel="shortcut icon" href="/assets/queue.png" type="image/png">
<link rel="shortcut icon" href="/queue.png" type="image/png">
<link rel="stylesheet" href="./index.scss">
</head>

View File

@ -6,7 +6,7 @@ import {
dataMigrations,
deserializeQueue,
serializeQueue,
} from '../source/settings/migrations';
} from '../source/settings/migrations.js';
const queueItemSample: Queue.Item = {
added: new Date('2022-03-02T16:00:00Z'),

View File

@ -8,6 +8,7 @@
"moduleResolution": "Node",
"noEmit": true,
"outDir": "build",
"skipLibCheck": true,
"strict": true,
"target": "ESNext"
},
@ -15,10 +16,5 @@
"source/**/*.ts",
"tests/**/*.ts",
"vite.config.ts"
],
"ts-node": {
"compilerOptions": {
"module": "CommonJS"
}
}
]
}

View File

@ -46,11 +46,11 @@ export default defineConfig({
// See vite-plugin-web-extension for documentation.
// https://github.com/aklinker1/vite-plugin-web-extension
webExtension({
assets: 'assets',
browser: targetBrowser,
manifest: () => createManifest(targetBrowser),
webExtConfig,
}),
],
publicDir: 'source/assets',
root: sourceDir,
});