Npm package naming standards

I swore I looked around the forums, but got nothing definitive. Assuming I’m required to use scopes (which I am where I work), then is it customary to do the res- prefix? If so, why not rescript-? You and I know what res- is, but no one else does.

I’m thinking of going with @myscope/rescript-my-library unless y’all are like “Jesse, dude, you should of read this article here…”

… or is the justification like “ts” is a TypeScript thing so “res” is a ReScript thing?

Oh wait, Yawar sent me this:


Yeah rescript- is the right prefix. Hopefully at some point we will have a thorough package publishing guide with more details than just the naming conventions.

Back then there was no proper guidance, so some libraries migrated from re- to res-. Any tips on where you’d expect to find this kind of information would be highly appreciated!

1 Like

Thanks! Makes sense. In the docs; I swear I searched and didn’t find it. Like, yesterday I was trying to find memoize and ended up finding Lazy, and was like “oh cool!”; I noticed in scrolling it was buried in some of the left had nav for docs I hadn’t read in depth yet, so the search works good there. I’d just assume y’all would maybe group with those. You know how Elm is all like “Here’s what we are, here’s how you do it, here’s how to participate?” I think it’s that last part we need.

For example, maybe either under “Contributing” or perhaps “Publishing”. I know there was a Tweet recently about how you can build ReScript with support for those who don’t have ReScript. These kind of things perhaps could be in a guide since we have a bit more work involved, and flexibility, compared to the TypeScript crew.

1 Like

There is a previous discussion on this forum, but I don’t think I used the word npm so maybe it didn’t show up in your search :sweat_smile: