-
Notifications
You must be signed in to change notification settings - Fork 147
Closed
Description
Currently we have two bash scripts that won't work for PowerShell users.
- in the
package.json
postinstall
script we do a bash command that copiesseed-db.json
todb.json
- If
json-server
doesn't shut down for any reason, the user won't be able tonpm start
because the still-openjson-server
will be occupying port 3333. So we have an error message that suggests running ournpm run kill-db
, which is a bash script.
For each of these, we need a solution that works for Windows (PowerShell specifically). From what I understand after talking to some Windows users who do lots of JS work, VSCode uses PowerShell by default unless configured otherwise. Also I'm being told that PowerShell users can do all the NPM/Git stuff that bash does so for those who are good at PowerShell and prefer it, it might be difficult to ask them to use something else.
I think we can use: https://github.com/charlesguse/run-script-os
The basic idea is we'd have package.json
scripts that look like this:
"kill-db": "...bash script here"
"kill-db:windows": "...powershell script here"
I just can't test it out since I don't have windows. Maybe @cassidoo can?
Metadata
Metadata
Assignees
Labels
No labels