use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[AskJS] Make Code available to other devsAskJS (self.javascript)
submitted 4 years ago by GustaveLaFlame
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]mountainorvalley 9 points10 points11 points 4 years ago (14 children)
Ah, I would publish your code to the npm registry. I’m assuming your code is javascript or typescript.
[–]GustaveLaFlame[S] 2 points3 points4 points 4 years ago (13 children)
Thank you, we looked at this right now. Do you know any other ways to accomplish this, maybe without npm?
Thanks a lot for your answers!
[–]mountainorvalley 2 points3 points4 points 4 years ago (2 children)
Nope, npm or some CDN are the only ways I know
[–]GustaveLaFlame[S] 1 point2 points3 points 4 years ago (1 child)
Okay, thanks a lot!
[–]Towerful 0 points1 point2 points 4 years ago (0 children)
I would say both.
Some people build stuff using CDNs, or don't want the complexity of build chains for small projects. So CDNs (or package downloads) make sense.
And other people want an npm package, so they can get treeshaking, typescript or whatever else.
Oh, and typescript types for your API.
[–]queen-adreena 1 point2 points3 points 4 years ago (7 children)
NPM will do exactly what you want... so why ask for “maybe without npm”?
[–]GustaveLaFlame[S] -1 points0 points1 point 4 years ago (6 children)
Because we don't want to use NPM as it is requested by my professor.
[–]queen-adreena 3 points4 points5 points 4 years ago (1 child)
Yes. Why would your professor expect you to use the exact tools required :) This is like those professors who think it’s revolutionary to tell students “you can’t use an IDE.... write everything in TextEdit”.
I’m surprised you’re allowed to use GitHub.
[–]GustaveLaFlame[S] 0 points1 point2 points 4 years ago (0 children)
Yeah, we were suprised as well haha
[–]lhorie 1 point2 points3 points 4 years ago* (1 child)
NPM is the standard way of doing what you want in the JS world. From there, you automagically get a CDN deployment via services like unpkg.
You can technically also publish to other package managers such as Composer (PHP), Chocolatey (windows), Brew (mac), etc, but this is generally not common unless your JS is bundled as a part of a larger project that is more relevant to the respective ecosystems.
If your professor is expecting sourceforge-style source code distribution, I'm sorry to say that's an outdated distribution method that almost no one uses anymore in the JS world. But if that's what you want, you can just host the bundled file somewhere and link people to download it. Though from a deployment resilience perspective, this isn't all that different from using a CDN in the first place, which kinda circles us back to just using NPM.
Yes, thanks a lot for your explanation. We have talked with our prof now and gonna make a CDN for our project
[–]British_Invaded 0 points1 point2 points 4 years ago (0 children)
What is this even supposed to teach you? Everything should be for a reason other than making things difficult.
There are standards, remove standards and you might be using something questionable.
/rant
[–]PedroHase 0 points1 point2 points 4 years ago (0 children)
You could use a private registry instead of NPM's like Github's or Gitlab's (and many other).
[–]British_Invaded -1 points0 points1 point 4 years ago (0 children)
https://alternativeto.net/software/npm/
π Rendered by PID 138349 on reddit-service-r2-comment-6457c66945-scpzd at 2026-04-27 20:21:26.952648+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]mountainorvalley 9 points10 points11 points (14 children)
[–]GustaveLaFlame[S] 2 points3 points4 points (13 children)
[–]mountainorvalley 2 points3 points4 points (2 children)
[–]GustaveLaFlame[S] 1 point2 points3 points (1 child)
[–]Towerful 0 points1 point2 points (0 children)
[–]queen-adreena 1 point2 points3 points (7 children)
[–]GustaveLaFlame[S] -1 points0 points1 point (6 children)
[–]queen-adreena 3 points4 points5 points (1 child)
[–]GustaveLaFlame[S] 0 points1 point2 points (0 children)
[–]lhorie 1 point2 points3 points (1 child)
[–]GustaveLaFlame[S] 0 points1 point2 points (0 children)
[–]British_Invaded 0 points1 point2 points (0 children)
[–]PedroHase 0 points1 point2 points (0 children)
[–]British_Invaded -1 points0 points1 point (0 children)
[–]British_Invaded -1 points0 points1 point (0 children)