Build script
This commit is contained in:
parent
de4f6a2383
commit
120caf6b98
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"arrowParens": "avoid",
|
||||||
|
"trailingComma": "none",
|
||||||
|
"tabWidth": 4
|
||||||
|
}
|
4
build.ts
4
build.ts
|
@ -1,4 +0,0 @@
|
||||||
await Bun.build({
|
|
||||||
entrypoints: ["src/index.tsx"],
|
|
||||||
outdir: "./build",
|
|
||||||
});
|
|
21
package.json
21
package.json
|
@ -1,11 +1,14 @@
|
||||||
{
|
{
|
||||||
"name": "mpp-saturn",
|
"name": "mpp-saturn",
|
||||||
"module": "src/index.ts",
|
"module": "src/index.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"devDependencies": {
|
"scripts": {
|
||||||
"bun-types": "latest"
|
"build": "bun scripts/build.ts"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "^5.0.0"
|
"bun-types": "latest"
|
||||||
}
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"typescript": "^5.0.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
import fs from "fs";
|
||||||
|
|
||||||
|
await Bun.build({
|
||||||
|
entrypoints: ["src/index.tsx"],
|
||||||
|
outdir: "./build/index.js",
|
||||||
|
});
|
||||||
|
|
||||||
|
const userscriptHeader = fs
|
||||||
|
.readFileSync("scripts/userscriptHeader.js")
|
||||||
|
.toString();
|
||||||
|
const artifact = fs.readFileSync("build/index.js").toString();
|
||||||
|
|
||||||
|
fs.writeFileSync("build/Saturn.user.js", userscriptHeader + artifact);
|
|
@ -0,0 +1,9 @@
|
||||||
|
// ==UserScript==
|
||||||
|
// @name Saturn
|
||||||
|
// @namespace MPP
|
||||||
|
// @match https://mppclone.com/*
|
||||||
|
// @grant none
|
||||||
|
// @version 1.0
|
||||||
|
// @author Hri7566, Foonix
|
||||||
|
// @description 9/15/2023, 6:42:49 AM
|
||||||
|
// ==/UserScript==
|
Loading…
Reference in New Issue