News for hackers. Stuff that matters.
Re:Show HN: ztext.js – JavaScript library that makes any fon... by Waterluvian on Wednesday August 26, 2020 @06:15PM (#24287925)
How popular is “download this minified file and use it!” Vs. Package management?

I feel like that’s an instant turn off. I don’t want to manually manage all my stuff.

Or is there some middle ground where people just put a URL to the download in their package manager solution, whatever it is.

Re:Show HN: ztext.js – JavaScript library that makes any fon... by danbolt on Wednesday August 26, 2020 @07:32PM (#24288510)
I don't write JavaScript professionally (outside of embedding into C++ applications), but I do make small single-page browser games on my spare time.

I only really use npm packages for Electron; I usually have the libraries locally stored and don't do any soft preprocessing/packaging. Being able to "drop in" the source much like a C/C++ library ends up being comfortable for me for these smaller things. [1]

[1] https://github.com/danbolt/switch-compo/blob/820ce5fb4944e57...

Re:Show HN: ztext.js – JavaScript library that makes any fon... by jedimastert on Wednesday August 26, 2020 @06:33PM (#24288085)
For me, the middle ground is minified/gzipped CDN hosted. Just a simple `<script src="..."></script>` for me.

Presumably you could do that here too, but I don't know how this host feels about hot-linking

Re:Show HN: ztext.js – JavaScript library that makes any fon... by 1f60c on Wednesday August 26, 2020 @07:10PM (#24288334)
You can use jsDelivr:

  <script src="https://cdn.jsdelivr.net/gh/bennettfeely/bennett@master/ztext/js/ztext.min.js"></script>
(You should probably link to a specific commit, though, like:

  <script src="https://cdn.jsdelivr.net/gh/bennettfeely/bennett@24f27b0f902821147ef726735b2717f27335c282/ztext/js/ztext.min.js"></script>
.)
Re:Show HN: ztext.js – JavaScript library that makes any fon... by flingo on Wednesday August 26, 2020 @10:16PM (#24289526)
Does npm or whatever package manager is in vogue not have a hack to make a "package" out of a URL pointing to some javascript? (even if someone has to write some automation to package every version from github, as it comes out.)

Although, this point is moot as soon as someone packages it for whatever package manager you use. No matter how hackily they do it. e.g. if there were a npm package called "auto-import-arbitrary-or-versioned-file-from-git-repo-or-http-url" that consolidated _all_ of your random single-file imports, that'd count IMO.

Re:Show HN: ztext.js – JavaScript library that makes any fon... by t0astbread on Wednesday August 26, 2020 @07:46PM (#24288612)
I do this nowadays when the app I'm building isn't too complex yet. I download the latest Preact bundle from unpkg, commit it into git (I know it feels wrong but really, it's fine) maybe add htm and write my stuff as static unprocessed files.

Of course, it's good to have the freedom to go both with and without a package manager and build tools, since this doesn't scale at all.