Fixed sed command in postinstall script to be platform dependent
This commit is contained in:
parent
e53108c493
commit
345ad741b3
@ -172,7 +172,7 @@
|
||||
"testui": "grunt testui",
|
||||
"testuidev": "npx nightwatch --env=dev",
|
||||
"lint": "grunt lint",
|
||||
"postinstall": "find ./node_modules/crypto-api/src/ \\( -type d -name .git -prune \\) -o -type f -print0 | xargs -0 sed -i '' -e '/\\.mjs/!s/\\(from \"\\.[^\"]*\\)\";/\\1.mjs\";/g'",
|
||||
"postinstall": "sh postinstall.sh",
|
||||
"newop": "node --experimental-modules src/core/config/scripts/newOperation.mjs"
|
||||
}
|
||||
}
|
||||
|
6
postinstall.sh
Executable file
6
postinstall.sh
Executable file
@ -0,0 +1,6 @@
|
||||
# Add file extensions to Crypto-Api imports
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
find ./node_modules/crypto-api/src/ \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i '' -e '/\.mjs/!s/\(from "\.[^"]*\)";/\1.mjs";/g'
|
||||
else
|
||||
find ./node_modules/crypto-api/src/ \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i -e '/\.mjs/!s/\(from "\.[^"]*\)";/\1.mjs";/g'
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user