Moved postinstall script to a Grunt task to fix relative calls. npm scripts now use local grunt install.

This commit is contained in:
n1474335 2021-02-03 19:07:39 +00:00
parent 83f119f7e4
commit 6b10f61e11
6 changed files with 21 additions and 17 deletions

View file

@ -411,6 +411,16 @@ module.exports = function (grunt) {
]),
stdout: false,
},
fixCryptoApiImports: {
command: [
`[[ "$OSTYPE" == "darwin"* ]]`,
"&&",
`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'`,
"||",
`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'`
].join(" "),
stdout: false
}
},
});
};