Don't use node -e require for npm installer

master
Avery Harnish 5 years ago
parent 6500c5f09a
commit 677bd348a7
  1. 4
      npm/install.js
  2. 4
      npm/package.json
  3. 2
      npm/run.js
  4. 4
      npm/uninstall.js

@ -0,0 +1,4 @@
#!/usr/bin/env node
const { install } = require("./binary");
install();

@ -4,8 +4,8 @@
"description": "📦✨ your favorite rust -> wasm workflow tool!",
"main": "binary.js",
"scripts": {
"postinstall": "node -e 'require(\"./binary.js\").install()'",
"preuninstall": "node -e 'require(\"./binary.js\").uninstall()'"
"postinstall": "node ./install.js",
"preuninstall": "node ./uninstall.js"
},
"bin": {
"wasm-pack": "./run.js"

@ -1,4 +1,4 @@
#!/usr/bin/env node
const { run } = require("./binary");
run()
run();

@ -0,0 +1,4 @@
#!/usr/bin/env node
const { uninstall } = require("./binary");
uninstall();
Loading…
Cancel
Save