firefox + llama.cpp == very good prose.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore(build) transpile, lint, build

eagleusb e8f346d6 e017506a

+111
+25
eslint.config.js
··· 1 + import tseslint from "typescript-eslint"; 2 + import globals from "globals"; 3 + import { defineConfig } from "eslint/config"; 4 + 5 + export default defineConfig( 6 + { 7 + ignores: ["dist/**", "node_modules/**"], 8 + }, 9 + ...tseslint.configs.recommended, 10 + { 11 + languageOptions: { 12 + ecmaVersion: 2024, 13 + sourceType: "module", 14 + globals: { 15 + ...globals.browser, 16 + ...globals.es2024, 17 + }, 18 + }, 19 + rules: { 20 + "@typescript-eslint/no-explicit-any": "warn", 21 + "@typescript-eslint/consistent-type-imports": "error", 22 + "no-console": "warn", 23 + }, 24 + }, 25 + );
+19
tsconfig.json
··· 1 + { 2 + "compilerOptions": { 3 + "target": "ES2024", 4 + "module": "ESNext", 5 + "moduleResolution": "bundler", 6 + "strict": true, 7 + "esModuleInterop": true, 8 + "skipLibCheck": true, 9 + "forceConsistentCasingInFileNames": true, 10 + "resolveJsonModule": true, 11 + "declaration": false, 12 + "outDir": "dist", 13 + "rootDir": "src", 14 + "sourceMap": false, 15 + "types": ["firefox-webext-browser"] 16 + }, 17 + "include": ["src/**/*.ts"], 18 + "exclude": ["**/node_modules", "**/dist", "**/release", "**/public", "**/.*/"] 19 + }
+67
webpack.config.js
··· 1 + import path from "path"; 2 + import CopyPlugin from "copy-webpack-plugin"; 3 + import HtmlMinimizerPlugin from "html-minimizer-webpack-plugin"; 4 + import { fileURLToPath } from "url"; 5 + 6 + const __dirname = path.dirname(fileURLToPath(import.meta.url)); 7 + 8 + export default { 9 + entry: { 10 + background: "./src/background.ts", 11 + result: "./src/result.ts", 12 + }, 13 + output: { 14 + filename: "[name].js", 15 + path: path.resolve(__dirname, "dist"), 16 + clean: true, 17 + }, 18 + resolve: { 19 + extensions: [".ts", ".js"], 20 + }, 21 + module: { 22 + rules: [ 23 + { 24 + test: /\.ts$/, 25 + use: { 26 + loader: "ts-loader", 27 + options: { 28 + transpileOnly: true, 29 + }, 30 + }, 31 + exclude: /node_modules/, 32 + }, 33 + ], 34 + }, 35 + plugins: [ 36 + new CopyPlugin({ 37 + patterns: [ 38 + { from: "src/manifest.json", to: "manifest.json" }, 39 + { 40 + from: "src/result.html", 41 + to: "result.html", 42 + /** Mark as minimizable so HtmlMinimizerPlugin picks it up. */ 43 + info: { minimized: false }, 44 + }, 45 + ], 46 + }), 47 + ], 48 + optimization: { 49 + minimize: true, 50 + minimizer: [ 51 + "...", 52 + new HtmlMinimizerPlugin({ 53 + minimizerOptions: { 54 + collapseWhitespace: true, 55 + removeComments: true, 56 + minifyCSS: true, 57 + removeRedundantAttributes: true, 58 + removeEmptyAttributes: true, 59 + removeOptionalTags: true, 60 + }, 61 + }), 62 + ], 63 + }, 64 + performance: { 65 + hints: false, 66 + }, 67 + };