Open toviszsolt opened 2 months ago
You are able to consume JSR packages in vanilla JS projects just fine. Only ESM code is supported by design, let's not regress, the point is to let CJS and other obsolete module systems die.
@sachaw
Has docs for most symbols At least 80% of the packages' symbols should have symbol documentation. Currently 0% of symbols are documented.
JSDoc in the separated d.ts file. 🧐
Do you mean you'd like to upload .js
files with accompanying .d.ts
files? Or .js
files containing /** @type */
TSDoc annotaitons?
.js
files with accompanying .d.ts
files containing /** @type */
TSDoc
I'm linking the package again, because even though I've already linked it, no one seems to bother to look at the files. https://jsr.io/@toviszsolt/react-scrollspy/2.0.6/dist
That is already supported, as long as you add // @ts-self-types="./react-scrollspy.d.ts"
to the top of your JS file 👍
@lucacasonato
Thanks you for your answer, but this is not possible. There cannot be the suggested comment. Any other solution?
JSR supports and encourages publishing TypeScript source code rather than pairs of .js + .d.ts files. This allows JSR to provide more helpful auto-generated documentation, and helps provide improved auto-completion in editors.
I tried guys! I am trying really hard! 😁
Npm concept: time has proven that this is not the right approach.
Developers embed everything in packages as "distribution", when "distribution" should be the usable code, not the source code. Even in its smallest, compressed form. The repo with the source code is linked (in most of cases).
I have taken the time and the energy to learn and practice how to do it well on my part. Start a project → Setup rollup as bundler → build a dist version for CommonJS AND ES Modules AND TypeScript → Publish the dry necessary files only
I'm a JS developer, I hate TypeScript, no one is going to tell me that TypeScript is good, because I'll tell you to learn JS if you want to code in JS. And I also write the JSDoc in a separate file because it interferes with reading the code, just like TypeScript.
So guys, please find a place for people like me, and figure out how "Has docs for most symbols" challenge will be passed. 😎
The "Has provenance" challange I am able to solve. 👌
https://jsr.io/@toviszsolt/react-scrollspy