-
-
Notifications
You must be signed in to change notification settings - Fork 814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm scripts for windows #4607
npm scripts for windows #4607
Conversation
A little explanation: the package.json has some unescaped So I created a copy of
|
"url": "https://github.com/FreshRSS/FreshRSS.git" | ||
}, | ||
"license": "AGPL-3.0", | ||
"scripts": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of a new file, you could have just the scripts that require a Windows-specific command, e.g. "stylelint_win"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maybe we can find a syntax that works on both platforms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect the syntax as written is already a syntax that works on both platforms. I probably just used native shell instead because it's more intuitive. Cf. https://www.npmjs.com/package/fast-glob which is used by Stylelint. (I don't have npm set up on this laptop.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put another way, just change that single line in the original file, introduce an error and see if the CI catches it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the syntax without the quotes does not work in Bash, but another syntax might be possible
"eslint_fix": "eslint --fix --ext .js .", | ||
"markdownlint": "markdownlint '**/*.md'", | ||
"markdownlint_fix": "markdownlint --fix '**/*.md'", | ||
"rtlcss": "rtlcss -d p/themes/ && find p/themes/ -type f -name '*.rtl.rtl.css' -delete", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am afraid other things would not work on DOS-style command-line anyway, such as this command using find
. But all that works fine on Windows with WSL.
Ref #4602
The npm scripts (package.json) does not work on a Windows 10 machine.
So I started to investigate how to run it on Windows.
Here is my solution draft. Not complete yet. See it as proof of concept.