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",
|
||||
});
|
|
@ -2,6 +2,9 @@
|
|||
"name": "mpp-saturn",
|
||||
"module": "src/index.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "bun scripts/build.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bun-types": "latest"
|
||||
},
|
||||
|
|
|
@ -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