From 4990a1f9f17f4773196705a9ab45e1eed54cc428 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Mon, 21 May 2018 11:25:13 +0000 Subject: [PATCH] ESM: Added file exists check to npm postinstall script. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b1b194b..527beeb9 100644 --- a/package.json +++ b/package.json @@ -125,6 +125,6 @@ "test": "grunt test", "docs": "grunt docs", "lint": "grunt lint", - "postinstall": "npx j2m node_modules/crypto-api/src/crypto-api.js" + "postinstall": "[ -f node_modules/crypto-api/src/crypto-api.mjs ] || npx j2m node_modules/crypto-api/src/crypto-api.js" } }