To try Astro on your local machine, run npm create astro@latest in any terminal.
because it doesn't make it clear to me what to do before this command will actually do anything. No, running this command will not work in any terminal. To try Astro on your local machine, run npm create astro@latest in any terminal.
because it doesn't make it clear to me what to do before this command will actually do anything. No, running this command will not work in any terminal.This particular example isn't too bad -- looking at that line, it would be clear to me that I'm missing 'npm', and the solution is obvious -- find out what npm is, and get it installed. But the things that really bit me were tons of examples of JavaScript, which included strange lines like 'import', and I had no idea how to get my website's JavaScript to understand what an import is or any of the other syntax. Nothing would work! I didn't realise there was a whole ecosystem around how to build your code so that it can make use of these things. Every guide assumed I had things going, and I just didn't understand that I needed this other infrastructure in place first before I could do anything.
[1] https://peterxjang.com/blog/modern-javascript-explained-for-...
Some notes of things that have changed in the last five years:
- bundling is (almost) no longer needed for simple import/export as we now have a native module capability (esmodules). The biggest issue you’re likely to have here is waiting for any dependencies you have to upgrade from common js to esmodules.
- transpiling is not as necessary unless you explicitly have to support IE11, or require something in the latest ecmascript spec.
It really speaks to the maturation of front-end development that after five years that article is still fairly accurate.
About time too - I’m too old to put up with that level of churn anymore.
Exactly proving my original point.
Seriously, JS static website generators are the worst... use something written in any compiled language so you just download and run a single binary, no messing around with npm and millions of dependencies.
Take your pick here: https://jamstack.org/generators/
Ironically, Composer actually lists npm as one of its inspirations [1].
> "...Composer is strongly inspired by node's npm and ruby's bundler."
Take a look for example at the rust installation steps [1]. They tell you to run the following command in your terminal: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh". They don't tell you to first make sure you have curl installed (or sh for that matter).
I agree; the "in any terminal" part is paternalistically redundant - any software developer who recognizes the npm command will know what to do with it.
the reason node based documentation sucks so bad, is that generally by the time you read it, it's already deprecated.
s/