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

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

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