-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🎸 combine utools plugin and tampermonkey in one template
combine utools plugin and tampermonkey in one template
- Loading branch information
Showing
57 changed files
with
611 additions
and
61 deletions.
There are no files selected for viewing
Submodule config
updated
15 files
+4 −0 | index.ts | |
+1 −1 | package.json | |
+44 −0 | tampermonkey/README.md | |
+23 −0 | tampermonkey/preact-ts.ts | |
+23 −0 | tampermonkey/preact.js | |
+27 −0 | tampermonkey/react-ts.ts | |
+27 −0 | tampermonkey/react.js | |
+17 −0 | tampermonkey/solid-ts.ts | |
+17 −0 | tampermonkey/solid.js | |
+18 −0 | tampermonkey/svelte-ts.ts | |
+18 −0 | tampermonkey/svelte.js | |
+16 −0 | tampermonkey/vanilla-ts.ts | |
+16 −0 | tampermonkey/vanilla.js | |
+23 −0 | tampermonkey/vue-ts.ts | |
+23 −0 | tampermonkey/vue.js |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
44 changes: 44 additions & 0 deletions
44
projects/all-in-one-template/config/tampermonkey/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
## tampermonkey react-ts | ||
|
||
``` | ||
pnpm add -D @types/node @types/react @types/react-dom @vitejs/plugin-react typescript vite vite-plugin-monkey | ||
pnpm add react react-dom | ||
``` | ||
|
||
## tampermonkey preact-ts | ||
|
||
``` | ||
pnpm add -D typescript vite vite-plugin-monkey @types/node @preact/preset-vite | ||
pnpm add preact | ||
``` | ||
|
||
## tampermonkey vue-ts | ||
|
||
``` | ||
pnpm add -D @types/node @vitejs/plugin-vue typescript vite vite-plugin-monkey vue-tsc | ||
pnpm add vue | ||
``` | ||
|
||
## tampermonkey vanilla-ts | ||
|
||
``` | ||
pnpm add -D typescript vite vite-plugin-monkey @types/node | ||
pnpm add | ||
``` | ||
|
||
## tampermonkey solid-ts | ||
|
||
``` | ||
pnpm add -D typescript vite vite-plugin-monkey @types/nodes | ||
pnpm add | ||
``` | ||
|
||
## tampermonkey svelte-ts | ||
|
||
``` | ||
pnpm add -D typescript vite vite-plugin-monkey @types/node @sveltejs/vite-plugin-svelte@tsconfig/svelte svelte svelte-check svelte-preprocess tslib | ||
pnpm add | ||
``` |
23 changes: 23 additions & 0 deletions
23
projects/all-in-one-template/config/tampermonkey/preact-ts.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { defineConfig } from 'vite'; | ||
import preact from '@preact/preset-vite'; | ||
import monkey, { cdn } from 'vite-plugin-monkey'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [ | ||
preact(), | ||
monkey({ | ||
entry: 'src/main.tsx', | ||
userscript: { | ||
icon: 'https://vitejs.dev/logo.svg', | ||
namespace: 'npm/vite-plugin-monkey', | ||
match: [ 'https://www.google.com/' ], | ||
}, | ||
build: { | ||
externalGlobals: { | ||
preact: cdn.jsdelivr('preact', 'dist/preact.min.js'), | ||
}, | ||
}, | ||
}), | ||
], | ||
}); |
23 changes: 23 additions & 0 deletions
23
projects/all-in-one-template/config/tampermonkey/preact.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { defineConfig } from 'vite'; | ||
import preact from '@preact/preset-vite'; | ||
import monkey, { cdn } from 'vite-plugin-monkey'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [ | ||
preact(), | ||
monkey({ | ||
entry: 'src/main.tsx', | ||
userscript: { | ||
icon: 'https://vitejs.dev/logo.svg', | ||
namespace: 'npm/vite-plugin-monkey', | ||
match: [ 'https://www.google.com/' ], | ||
}, | ||
build: { | ||
externalGlobals: { | ||
preact: cdn.jsdelivr('preact', 'dist/preact.min.js'), | ||
}, | ||
}, | ||
}), | ||
], | ||
}); |
27 changes: 27 additions & 0 deletions
27
projects/all-in-one-template/config/tampermonkey/react-ts.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import monkey, { cdn } from 'vite-plugin-monkey'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [ | ||
react(), | ||
monkey({ | ||
entry: 'src/main.tsx', | ||
userscript: { | ||
icon: 'https://vitejs.dev/logo.svg', | ||
namespace: 'npm/vite-plugin-monkey', | ||
match: [ 'https://segmentfault.com/' ], | ||
}, | ||
build: { | ||
externalGlobals: { | ||
react: cdn.jsdelivr('React', 'umd/react.production.min.js'), | ||
'react-dom': cdn.jsdelivr( | ||
'ReactDOM', | ||
'umd/react-dom.production.min.js', | ||
), | ||
}, | ||
}, | ||
}), | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import monkey, { cdn } from 'vite-plugin-monkey'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [ | ||
react(), | ||
monkey({ | ||
entry: 'src/main.tsx', | ||
userscript: { | ||
icon: 'https://vitejs.dev/logo.svg', | ||
namespace: 'npm/vite-plugin-monkey', | ||
match: [ 'https://segmentfault.com/' ], | ||
}, | ||
build: { | ||
externalGlobals: { | ||
react: cdn.jsdelivr('React', 'umd/react.production.min.js'), | ||
'react-dom': cdn.jsdelivr( | ||
'ReactDOM', | ||
'umd/react-dom.production.min.js', | ||
), | ||
}, | ||
}, | ||
}), | ||
], | ||
}); |
17 changes: 17 additions & 0 deletions
17
projects/all-in-one-template/config/tampermonkey/solid-ts.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { defineConfig } from 'vite'; | ||
import solidPlugin from 'vite-plugin-solid'; | ||
import monkey from 'vite-plugin-monkey'; | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
solidPlugin(), | ||
monkey({ | ||
entry: 'src/index.tsx', | ||
userscript: { | ||
icon: 'https://vitejs.dev/logo.svg', | ||
namespace: 'npm/vite-plugin-monkey', | ||
match: [ 'https://www.google.com/' ], | ||
}, | ||
}), | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { defineConfig } from 'vite'; | ||
import solidPlugin from 'vite-plugin-solid'; | ||
import monkey from 'vite-plugin-monkey'; | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
solidPlugin(), | ||
monkey({ | ||
entry: 'src/index.tsx', | ||
userscript: { | ||
icon: 'https://vitejs.dev/logo.svg', | ||
namespace: 'npm/vite-plugin-monkey', | ||
match: [ 'https://www.google.com/' ], | ||
}, | ||
}), | ||
], | ||
}); |
Oops, something went wrong.