1
Fork 0

Rewrite readme.

This commit is contained in:
Bauke 2022-09-29 11:32:48 +02:00
parent c797d4640b
commit f116547ffa
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 9 additions and 32 deletions

View File

@ -1,45 +1,18 @@
# WebExtension Template # WebExtension 🌱 Template
> An opinionated WebExtension template. > **An opinionated WebExtension template.**
## Features
* Building with [Vite] and [vite-plugin-web-extension] * Building with [Vite] and [vite-plugin-web-extension]
* Packaging with [git-archive], [pnpm] and [web-ext] * Packaging with [git-archive] and [web-ext]
* [Sass] and [TypeScript] preconfigured * [Sass] and [TypeScript] preconfigured
* [Stylelint] and [XO] code linting * [Stylelint] and [XO] code linting
* [HTM] and [Preact] frontend development * [HTM] and [Preact] frontend development
* Typed browser APIs with [webextension-polyfill] * Typed browser APIs with [webextension-polyfill]
## Usage
1. Download the repository.
2. Install the dependencies.
* Optionally update the dependencies too.
3. Start an auto-reloading browser instance for development.
4. Check for linting and TypeScript errors.
5. Build the WebExtension for production.
```sh
# Step 1.
pnpx degit Holllo/web-ext-template your-awesome-project
cd your-awesome-project
# Step 2.
pnpm install
pnpm update --latest
# Step 3, you can change which browser to use in the Vite config.
pnpm start
# Step 4.
pnpm test
# Step 5, see the web-ext-artifacts directory for output.
pnpm build
```
[git-archive]: https://git-scm.com/docs/git-archive [git-archive]: https://git-scm.com/docs/git-archive
[HTM]: https://github.com/developit/htm [HTM]: https://github.com/developit/htm
[pnpm]: https://pnpm.io
[Preact]: https://preactjs.com [Preact]: https://preactjs.com
[Sass]: https://sass-lang.com [Sass]: https://sass-lang.com
[Stylelint]: https://stylelint.io [Stylelint]: https://stylelint.io
@ -49,3 +22,7 @@ pnpm build
[web-ext]: https://github.com/mozilla/web-ext [web-ext]: https://github.com/mozilla/web-ext
[webextension-polyfill]: https://github.com/mozilla/webextension-polyfill [webextension-polyfill]: https://github.com/mozilla/webextension-polyfill
[XO]: https://github.com/xojs/xo [XO]: https://github.com/xojs/xo
## License
Distributed under the [Unlicense](https://spdx.org/licenses/Unlicense.html) license, see [LICENSE](https://git.bauke.xyz/Holllo/webextension-template/src/branch/main/LICENSE) for more information.