Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pikapower9080/esbuild-userscript
Template for creating userscripts with esbuild
https://github.com/pikapower9080/esbuild-userscript
Last synced: about 15 hours ago
JSON representation
Template for creating userscripts with esbuild
- Host: GitHub
- URL: https://github.com/pikapower9080/esbuild-userscript
- Owner: pikapower9080
- Created: 2024-12-04T17:23:27.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-04T21:26:46.000Z (about 2 months ago)
- Last Synced: 2024-12-04T22:29:52.867Z (about 2 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# esbuild-userscript
Template for creating a Tampermonkey/GreaseMonkey userscript with esbuild.
## Required Tools
- [Bun](https://bun.sh/)
- Git## Quick Start
1. Clone the repo
```sh
git clone https://github.com/pikapower9080/esbuild-userscript
cd esbuild-userscript
```
2. Create a clean git repo
```sh
rm -rf .git
git init
```
3. Install dependencies:
```sh
bun install
```
4. Modify `userscript.json` to your liking.
```json
{
"name": "My Userscript",
"namespace": "http://tampermonkey.net/",
"version": "1.0.0",
"author": "you",
"match": [
"https://example.com/page1",
"https://example.com/page2"
],
"icon": "https://example.com/icon.png",
"grant": ["GM.setValue", "GM.getValue"]
}
```
5. Start the development server
```sh
bun run dev
```
6. Make changes to `src/index.js`
7. Check for changes in `dist/index.js`
8. Run a production build
```sh
bun run build
```