Sfoglia il codice sorgente

ESM: Added file exists check to npm postinstall script.

n1474335 7 anni fa
parent
commit
4990a1f9f1
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      package.json

+ 1 - 1
package.json

@@ -125,6 +125,6 @@
     "test": "grunt test",
     "test": "grunt test",
     "docs": "grunt docs",
     "docs": "grunt docs",
     "lint": "grunt lint",
     "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"
   }
   }
 }
 }