4 ms·
It's wild that you have to set up Docker to contribute to 600 characters of JavaScript. It's like building a robot to pass the butter.
by bsimpson 4y ago
It's wild that you have to set up Docker to contribute to 600 characters of JavaScript.
It's like building a robot to pass the butter.
- krick 4y agoYou don't really have to. It's just minification and stuff, just a build step, I suppose the owner could do that as well, if your contribution has any value, but you didn't do it properly. Do you know a better way to build/minify js? Perhaps you have all these npm packages installed on your PC already? I don't, and I don't want to. If Dockerfile wasn't included I'd have to make my own just to run any fucking build-tools it requires to make a bookmarklet (which I most likely wouldn't bother to do). And, yeah, it requires them, this is not some optional stuff that author did just to be fancy. You could set up some CI to make automatic builds after merging to master, but that still wouldn't solve the problem of contributor wanting to test what he wrote.
- bsimpson 4y agoI've never used Docker (nor make). From the outside, it feels like some heavy VM thing for building isolated systems in the cloud. It's not something I'm used to seeing in the client-side ecosystem. I just took a second look at the repo, and realized there's no package.json. Typically, an open-source JavaScript project would have one. It would enumerate the dependencies and how they work together to generate the final output. As a JavaScript contributor, I expect to be able to type yarn yarn run build into any repo to generate the output (and test any changes I've made). I suspect the interactive web is not the author's primary platform. That's fine - it's his project; he can structure it however he wants. I was just surprised to see an unfamiliar, nontrivial dependency to concatenate a handful of lines into a bookmarklet. Since you asked "Do you know a better way?" you can port the `npm install` line to a dictionary of dependencies in package.json. You can use wireit in that same file to chain the CLIs together, accomplishing what's currently the ENTRYPOINT line in Dockerfile. It does the same thing that the current setup does, but it follows the conventions of the ecosystem. This makes it more available to external contributors, because they don't have to learn/install tools like Docker that aren't typically seen in JS.
- flatiron 4y agohttps://github.com/t-mart/kill-sticky/blob/master/Dockerfile https://github.com/t-mart/kill-sticky/blob/master/Dockerfile I’m reality it’s just using node. But removed the requirement to set node up.
- bsimpson 4y agoSwitched the requirement to setting Docker up. Just depends on what you expect your contributors to be more familiar/comfortable/ready for. For most JS projects, package.json is the expected onramp for new contributors. We all have node installed.
- krick 4y agoNo "we" don't.
- Loeffelmann 4y agoDo "we" all have docker installed?
- cxr 4y agoThis is the dumbest conflict between two opposing parties that are equally-wrong-but-equally-dug-in that I've seen in a while. Not everyone has NodeJS. And not everyone has Docker, either. You know what we all do have? A Web browser. The World Wide Wruntime. You know—it's the thing that you're using to look at the README on GitHub (and this comment, probably), and is the reason that JS and bookmarklets even exist in the first place. It's widely popular exactly for its ability to publish/share content and apps without any onerous install step. (It's pretty nifty. NodeJS programmers should really consider looking into it sometime.) Build.app.htm. Double click and then drag and drop the project source tree onto the browser tab. Done.
- deleted 4y ago[deleted]
- cxr 4y ago> Do you know a better way to build/minify js? Perhaps you have all these npm packages installed on your PC already? If only there were some sort of ubiquitous platform—a World Wide one, even—that we could reliably depend on to fetch remote resources and that was especially suited for executing JS. It would need to run the code in a sandbox of, course, to ensure that it's acting in the interests of the user—a sort of "user agent"—and not just executing arbitrary code with full rwx privileges in the interests of the script author. Maybe in a more perfect world... Previously: <https://news.ycombinator.com/item?id=24495646 https://news.ycombinator.com/item?id=24495646>
- yosito 4y agoYou're one of those people who just grabs an unwrapped stick of butter and chucks it at the other end of the table, aren't you?
- bsimpson 4y agoI like the feeling on my hands.
- tempodox 4y agoSee my comment on how to make it without Docker: https://news.ycombinator.com/item?id=33005263 https://news.ycombinator.com/item?id=33005263