-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can this lib be published to npm as well ? #26
Comments
How does it work if you "just copy the code"? Node doesn't support TypeScript, so it's necessary to use a tool like dnt before Node can run it, unless you already have TypeScript/webpack/etc set up in your project. I could set up dnt and publish to npm, but I don't have a strong motivation to do this. The minio client is already available on NPM and is what this one is based on, so it has similar features. |
Thanks @bradenmacdonald, for your answer, I explored a few options and your lib was the best one over and over, any platform compared, Node.js Deno, and Cloudflare worker. So I made the Pr and the required changes to allow you to deploy in NPM if you like; otherwise I published my Fork, but I would prefer to keep one source of truth. |
Closing this for now. I'm not going to publish on npm but it can be used with npm (and many others) via JSR: https://jsr.io/@bradenmacdonald/s3-lite-client#installation |
Thanks @bradenmacdonald i'm using it but the typescript is missing i'm not sure it's from you i found this : |
@riderx The types are working just fine for me. Try this: mkdir test-project
cd test-project
echo '{"type": "module"}' > package.json
npm install --save typescript
npx jsr add @bradenmacdonald/s3-lite-client
echo 'import { S3Client } from "@bradenmacdonald/s3-lite-client";' > test.ts
echo '{"compilerOptions": {"module": "ESNext", "moduleResolution": "Bundler", "lib": ["ESNext", "DOM"], "strict": true}}' > tsconfig.json
npx tsc No output means the type checking worked. Here you can see the types showing up in VS Code in that same NodeJS project: |
"module": "ESNext", "moduleResolution": "Bundler" did the trick ! |
I use this lib in deno function and wanted to use the same in node code and it's not available, but if i just copy the code it work so i suppose you could publish it as well
The text was updated successfully, but these errors were encountered: