Skip to content

Commit 5d31f30

Browse files
feat: Bundle injectable
1 parent 3475835 commit 5d31f30

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
!.yarn/versions
77
.pnp.*
88

9+
container/lib/
10+
container/output/
11+
container/overlay/
12+
913
lib/
1014
node_modules/
1115
output/

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ output: node_modules
4040
.PHONY: injectable
4141
injectable: node_modules
4242
yarn vite --config vite.config.inject.js build
43+
mkdir --parents container/overlay/ && cp output/kitten-scientists.inject.js container/overlay/kitten-scientists.inject.js
4344

4445
.PHONY: userscript
4546
userscript: node_modules

container/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@
1818
"./*.js": {
1919
"types": "./lib/*.d.ts",
2020
"default": "./lib/*.js"
21+
},
22+
"./injectable.js": {
23+
"default": "./output/kitten-scientists.inject.js"
2124
}
2225
},
2326
"files": [
24-
"lib"
27+
"lib",
28+
"output"
2529
],
2630
"scripts": {
2731
"build": "yarn run build:all",

vite.config.inject.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default defineConfig({
1515
name: "kitten-scientists",
1616
},
1717
minify: false,
18-
outDir: "container/overlay",
18+
outDir: "output",
1919
rollupOptions: {
2020
external: ["jquery"],
2121
output: {

0 commit comments

Comments
 (0)