Skip to content

⏹️ An attempt to implement a high-quality alternative to AdBlock-type extensions in an interesting way. It will also include various other interesting features.

License

Notifications You must be signed in to change notification settings

blefnk/adblock-browser-extension

Repository files navigation

template-browser-extension

💡 Do you need a cool starter for your next cool browser extension? It's right here! ✅ Bun, TypeScript, ESLint v9, etc. 💻 Mozilla Firefox & Chromium (Google Chrome, Microsoft Edge, Opera, Vivaldi, etc.)

⭐ The current project is part of the ecosystem of the Relivator and Reliverse projects. 🙏 Please give a star to our projects to make them even better.

Scripts

  • To install dependencies: bun install
  • To check/lint/format: bun appts
  • To build: bun run build
  • To lint: bun lint
  • To run: bun dev

🩷 Sponsors

Thank you, everyone, for your support and for sharing this project! This project, Relivator, and Reliverse is currently sponsored by the following awesome people/organizations:

Love using this project? If you're feeling generous, I'd appreciate a cup of coffee. You'll get Reliverse Pro, access to some private repos, pre-release downloads, and the ability to influence my project planning. Thanks!

Roadmap

TODO: Add bun web-ext lint to bun lint script, and bun web-ext run to bun dev. Currently the error is thrown Error: Cannot find module './url'.

TODO: Try to remove bun and install pnpm. Check if web-ext works with this package manager, which works natively with nodejs (bun has own libs).

TODO: bun addons-linter ./extension/ doesn't works as well. This command throws an error You did not build addons-linter yet. Maybe because of bun.

Resources

  • web-ext: A command line tool to help build, run, and test web extensions.

Additional

This project was created using bun init in bun v1.1.12. Bun is a fast all-in-one JavaScript runtime.

FAQ

You can find other RQs (Reliverse Questions) in the [relivator-nextjs-template](https://github.com/blefnk/relivator-nextjs-template) repo.

  • RQ21: How do I switch the package manager from bun to pnpm, yarn, or npm? RA21: Here's a variant of scripts for pnpm. Scripts presets for other package managers coming soon. Just replace it in package.json (and make sure it don't miss anything).

    "scripts": {
      "appts": "run-s knip format lint typestat typecheck build",
      "build": "pnpm build ./src/index.ts --outdir ./extension/",
      "debug:eslint": "pnpm cross-env TIMING=12 eslint --fix .",
      "dev": "pnpm run src/index.ts",
      "dev:ext": "pnpm web-ext run --source-dir ./extension/",
      "dev:firefox": "pnpm run dev:ext -- --firefox=nightly",
      "format": "pnpm biome format --write .",
      "knip": "dotenv knip",
      "latest": "pnpm update --latest && pnpm add -D typescript@rc typescript-eslint@rc-v8",
      "lint": "pnpm eslint --cache --fix . && pnpm biome lint --write .",
      "lint:al": "pnpm addons-linter ./extension/",
      "lint:we": "pnpm web-ext lint",
      "preinstall": "npx only-allow pnpm",
      "reli:help": "pnpm tsx reliverse.ts --help",
      "reli:pm": "tsx reliverse.ts --pm",
      "typecheck": "tsc --noEmit",
      "typestat": "typestat --config typestat.json"
    }

Project Structure

Only a few of the files are listed here. This section will be updated in the future versions.

About

⏹️ An attempt to implement a high-quality alternative to AdBlock-type extensions in an interesting way. It will also include various other interesting features.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published