satnaing / astro-paper

A minimal, accessible and SEO-friendly Astro blog theme

Home Page:https://astro-paper.pages.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggestion: Modifications to the scripts in package.json are necessary for Windows compatibility.

gyunseo opened this issue · comments

npm run dev contains the bash(or zsh, fish etc) & operator, which is not compatible with Windows Powershell. It would be good to add the concurrently package to dev dependencies and make the following changes.

"dev": "concurrently --raw --kill-others \"astro check --watch\" \"astro dev\"",

Thanks for your suggestion! ✌🏻

So Windows Powershell users can only run the dev with your changes? Didn't know that.
BTW, what else did you encounter running AstroPaper?

@satnaing thanks for reply 👯‍♂️.
The & operator in Windows PowerShell operates differently than in the Bash Shell, so I believe using the concurrently package for parallel execution is the best option.

You can check out concurrently package here

So, currently, I'm thinking of two options.

  1. Add a section in docs and README for Windows PowerShell users, with a warning about running the script, and an explanation of what should be done to run the project.
  2. Add concurrently package as a dev dep in the project and run with concurrently for all users.

If there are no significant issues other than running multiple commands concurrently for PowerShell users, I prefer the first option. If not, might consider the 2nd option.
Any thoughts on this?

@satnaing I think option 1 is good :)