[HN Gopher] Running prettier 40x faster than prettier CLI using ... ___________________________________________________________________ Running prettier 40x faster than prettier CLI using dprint Author : lucacasonato Score : 69 points Date : 2022-04-25 21:15 UTC (1 hours ago) (HTM) web link (david.deno.dev) (TXT) w3m dump (david.deno.dev) | coolhoody wrote: | It is worth having Deno even if you are not using it: just as a | Js/Ts LSP server (it's inbuit). Smaller and better than tss etc. | | Also makes much more sense for local scripting. Give it a try | even if in doubt for production. | dimgl wrote: | I've been trying Deno on a personal project and it keeps | impressing me more and more. If Deno continues to improve like | this, I can see it being the future of JavaScript development. | This might go against the grain nowadays, but I'm really | productive with JavaScript/TypeScript and any innovation in this | space is appreciated. I've had to deal with so much ESM crap | these last couple of months and using Deno has been a refreshing | change of pace. | | Edit: I'm especially impressed with its dependency management. | Import maps are a breeze and a welcome change to... whatever is | going on in Nodeland. Like, I don't have to set up my imports | both in tsconfig.json and package.json and walk this delicate | tightrope to make sure that things don't just start breaking. | With Deno's import maps it kind of just... works. I also love | that I don't have to deal with a `node_modules` folder, and I can | choose to vendor my dependencies if I'd like. It reminds me of | the Go approach, which I really enjoy. | | There's other things I like but these are the big ones. The more | I can get switched over to Deno the better. | dsherret wrote: | To be clear, I created this site quickly on Deno Deploy this | weekend (I'm the author) and didn't bother getting a proper | domain yet. Hacker news is cutting off the subdomain of | david.deno.dev and this is just a personal post about the | dprint CLI and dprint-plugin-prettier, which aren't available | in Deno's CLI. | | Deno does use some other Rust-based dprint plugins for deno fmt | though and dprint-plugin-prettier uses an embedded Deno runtime | with Prettier snapshotted in it. Also, Deno now has a similar | built-in incremental formatting and linting as of 1.21 last | week, so those subcommands finish almost immediately after the | first run... though they were already very fast | https://deno.com/blog/v1.21#incremental-formatting-and-linti... | dimgl wrote: | Wow... this is so seamless I didn't even notice VSCode using | `deno fmt` under the hood. I'm gonna have to double check to | make sure I don't have Prettier running. | [deleted] | tmp_anon_22 wrote: | I just spent the better part of an hour trawling through issues | in the CRA, Webpack, and Axios github issues pages, pertaining | to the webpack4 -> webpack5 (10/10/2020) release. | | I do not believe there is willpower for institutional changes | to the javascript ecosystem that exists on timelines of less | then 5 years. | dimgl wrote: | Yeah I recently went through something similar too. Spent a | ton of time just digging through GitHub issues. | | Basically I've been dealing with the ESM changes. Add in the | TypeScript complexity and all of the sudden I've now spent | hours debugging some obscure issue rather than being | productive... I've debated moving away from Node.js | altogether because of it but there's no real realistic | alternatives right now (for frontend development/bundling | using React/Remix). | | I probably can't do any better, but the whole ESM migration | has been completely mishandled. Even more infuriating is the | response that things are working _as expected_... Hopefully | Deno gains some traction and we can put this all behind us. | antihero wrote: | Honestly I'd ditch CRA and hit up Vite nowadays. You will | have to deal with a few poorly made packages (e.g. from | Amazon) but it is a breath of fresh air. ___________________________________________________________________ (page generated 2022-04-25 23:00 UTC)