News for hackers. Stuff that matters.
Re:Today’s Javascript, from an outsider’s perspective by Carpetsmoker on Monday May 25, 2020 @10:16PM (#23306846)
But at least I can just download a .py file (or a bunch of files) and just import them. Perhaps the biggest frustration/pain point in this article isn't npm as such, but that you can't "just" use some JS module.
Re:Today’s Javascript, from an outsider’s perspective by yawaramin on Tuesday May 26, 2020 @01:15AM (#23307646)
> But at least I can just download a .py file (or a bunch of files) and just import them

Unless you have a Python version locally that doesn't support some features used in said .py file...

Re:Today’s Javascript, from an outsider’s perspective by dceddia on Monday May 25, 2020 @10:41PM (#23306954)
Nothing would stop you from doing that (import thing from ‘./downloaded.js’) but it’s Just Not Done That Way and packages aren’t really built with that in mind, so it probably wouldn’t work very well in practice.
Re:Today’s Javascript, from an outsider’s perspective by TechBro8615 on Monday May 25, 2020 @10:39PM (#23306946)
You definitely can. On the server side, you can literally do that. On the client side, you can "import" one with a script tag, and increasingly you can use modules in browsers too.