feat: remove complete dependency on bun to be able to compile to .js

This commit is contained in:
2024-10-08 10:23:17 +05:30
parent 50d377d6bd
commit d5669b2988
8 changed files with 75 additions and 79 deletions

View File

@@ -1,11 +0,0 @@
import { $ } from "bun";
import data from "../package.json";
const { version: ver } = data;
await $`
rm -rf ./dist
bun build --compile --minify --target=bun-linux-x64 ./confidant.ts --outfile ./dist/confidant_${ver}_linux_x64
bun build --compile --minify --target=bun-windows-x64 ./confidant.ts --outfile ./dist/confidant_${ver}_win_x64.exe
bun build --compile --minify --target=bun-darwin-arm64 ./confidant.ts --outfile ./dist/confidant_${ver}_darwin_arm64
`;

View File

@@ -1,7 +1,7 @@
import { $ } from "bun";
import { stringy } from "../src/utils";
import { randomBytes } from "crypto";
import chalkTemplate from "chalk-template";
import { writeFileSync } from "fs";
const envstring = `// env.ts
const env = {
@@ -15,5 +15,5 @@ const env = {
export default env;
`;
await $`echo ${envstring} > env.ts`;
writeFileSync("./env.ts", envstring);
console.log(chalkTemplate`{green env.ts initialized sucessfully!}`);