瀏覽代碼

ESM: Added file exists check to npm postinstall script.

n1474335 7 年之前
父節點
當前提交
4990a1f9f1
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      package.json

+ 1 - 1
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"
   }
 }