-
Notifications
You must be signed in to change notification settings - Fork 0
/
tobundle.ts
39 lines (39 loc) · 991 Bytes
/
tobundle.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// @ts-ignore
import Bun from "bun";
switch (process.argv[2]) {
case "js-1":
{
const pat = process.argv[3];
let js: string = await Bun.file(pat).text();
js = `${js}\n\n\n/*
* Copyright (c) 2024, MLC 'Strawmelonjuice' Bloeiman
*
* Part of project Lumina.
*
* Licensed under the BSD 3-Clause License. See the LICENSE file for more info.
*/
`;
await Bun.write(pat, js);
}
break;
case "css-1":
{
// Mostly just to remove that "empty value" error.
const pat = process.argv[3];
let css: string = await Bun.file(pat).text();
css = `/*!
* Copyright (c) 2024, MLC 'Strawmelonjuice' Bloeiman
*
* Part of project Lumina.
*
* Licensed under the BSD 3-Clause License. See the LICENSE file for more info.
*
* Mainly generated using TailwindCSS!
*/
\n\n\n${css.replaceAll(": ;", ": unset;").replaceAll(": ;", ": unset;").replaceAll("/*!", "/*")}`;
await Bun.write(pat, css);
}
break;
default:
console.log("No valid run subcommand was given.");
}