Gathering detailed insights and metrics for run-script-os-fix
Gathering detailed insights and metrics for run-script-os-fix
npm install run-script-os-fix
Typescript
Module System
Node Version
NPM Version
65.1
Supply Chain
80.3
Quality
74.9
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
55,339
Last Day
2
Last Week
2
Last Month
142
Last Year
1,892
1 Stars
8 Commits
2 Watching
1 Branches
1 Contributors
Latest Version
1.0.4
Package Id
run-script-os-fix@1.0.4
Size
3.02 kB
NPM Version
4.0.5
Node Version
7.4.0
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
-92%
2
Compared to previous week
Last month
-38%
142
Compared to previous month
Last year
47.8%
1,892
Compared to previous year
No dependencies detected.
You will be able to use OS specific operations in npm scripts.
##Note from surfncode This is a fork from https://github.com/charlesguse/run-script-os. It fixes the issue "Published index.js file has CRLF line endings, breaks Linux" (https://github.com/charlesguse/run-script-os/issues/1)
If you have experienced the pain of trying to make npm scripts usable across different operating system, this package is for you! Looking at you rm
and del
!
npm install --save-dev run-script-os-fix
Set run-script-os
(or run-os
) as the value of the npm script field that you want different functionality per OS. In the example below, we set test
, but it can be any npm script. It also uses pre
and post
commands (explained more below).
Then create OS specific scripts. In the example below, you can see:
test:win32
test:linux:darwin
Those can have OS specific logic.
package.json
{
...
"scripts": {
...
"test": "run-script-os",
"test:win32": "echo 'del whatever you want in Windows 32/64'",
"test:darwin:linux": "echo 'You can combine OS tags and rm all the things!'",
...
},
...
}
Windows Output:
> npm test
del whatever you want in Windows 32/64
macOS and Linux Output:
> npm test
You can combine OS tags and rm all the things!
When you call a script like npm test
, npm will first call pretest
if it exists. It will then call test
, which, if you are using run-script-os
, it will then call npm run test:YOUR OS
, which in turn will call pretest:YOUR OS
before actually running test:YOUR OS
. Then posttest:YOUR OS
will run, and then after that posttest
will finally execute.
There is an example showing pre
and post
commands found in the package.json
of this repository.
OS Options: darwin
, freebsd
, linux
, sunos
, win32
More information can be found in Node's process.platform
and Node's os.platform()
.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/8 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More