diff --git a/npm/install.js b/npm/install.js new file mode 100644 index 0000000..9b5bba1 --- /dev/null +++ b/npm/install.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node + +const { install } = require("./binary"); +install(); diff --git a/npm/package.json b/npm/package.json index 71eba27..e525c54 100644 --- a/npm/package.json +++ b/npm/package.json @@ -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" diff --git a/npm/run.js b/npm/run.js index 4b0b896..847da53 100755 --- a/npm/run.js +++ b/npm/run.js @@ -1,4 +1,4 @@ #!/usr/bin/env node const { run } = require("./binary"); -run() \ No newline at end of file +run(); diff --git a/npm/uninstall.js b/npm/uninstall.js new file mode 100644 index 0000000..56088ad --- /dev/null +++ b/npm/uninstall.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node + +const { uninstall } = require("./binary"); +uninstall();