This commit is contained in:
Braydon 2024-09-09 20:28:31 -04:00
parent b329d55b86
commit 5aca52d3dd
6 changed files with 53 additions and 32 deletions

@ -1,8 +0,0 @@
import dts from "bun-plugin-dts";
await Bun.build({
entrypoints: ["./src/index.ts"],
outdir: "./dist",
minify: true,
plugins: [dts()],
});

Binary file not shown.

@ -19,7 +19,7 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "bun run build.mjs",
"build": "tsup",
"prepublishOnly": "bun run build"
},
"files": [
@ -29,7 +29,6 @@
"@types/bun": "latest",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"bun-plugin-dts": "^0.2.2",
"react": "^18.3.1",
"react-dom": "18.3.1"
},
@ -37,5 +36,8 @@
"typescript": "^5.0.0",
"react": "*",
"react-dom": "*"
},
"dependencies": {
"tsup": "^8.2.4"
}
}

@ -12,9 +12,8 @@ export const useTetherWS = (
const [user] = useState<Snowflake>(snowflake);
useEffect(() => {
console.log("HELLO WORLD");
console.log("HELLO WORLD", endpoint, secure);
}, [snowflake]);
return user;
};
export default useTetherWS;

@ -1,21 +1,37 @@
{
"compilerOptions": {
"target": "es2020",
"module": "esnext",
"strict": true,
"esModuleInterop": true,
"moduleResolution": "node",
"skipLibCheck": true,
"noUnusedLocals": true,
"noImplicitAny": true,
"allowJs": true,
"noEmit": true,
"outDir": "dist",
"resolveJsonModule": true,
"paths": {
"@/*": ["./src/*"],
"@/lib/*": ["./src/lib/*"],
"@/types/*": ["./src/types/*"]
}
}
}
"compilerOptions": {
"module": "esnext",
"lib": [
"dom",
"esnext"
],
"target": "ESNext",
"moduleResolution": "node",
"jsx": "react",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"useUnknownInCatchVariables": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"exactOptionalPropertyTypes": true,
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true,
"paths": {
"@/*": [
"./src/*"
],
"@/lib/*": [
"./src/lib/*"
],
"@/types/*": [
"./src/types/*"
]
}
},
"include": [
"src"
]
}

12
JS-SDK/tsup.config.ts Normal file

@ -0,0 +1,12 @@
import { defineConfig } from "tsup";
export default defineConfig({
entry: ["./src/index.ts"],
format: ["cjs", "esm"],
dts: true,
target: "node20",
sourcemap: true,
minify: true,
publicDir: "build",
clean: true,
});