Pass package.json commands from a js file

49 views Asked by At

I am working on a node.js native addon. While building for 32bit and 64 bit I have to set two different command for two different field.

for 32bit

"scripts": {
  "install": "cmake-js compile cmake -G \"Visual Studio 16 2019\" -A Win32"
},
"cmake-js": {
  "arch": "ia32"
},

for 64bit

"scripts": {
  "install": "cmake-js compile cmake -G \"Visual Studio 16 2019\" -A x64"
},
"cmake-js": {
  "arch": "x64"
},

How can I set both cmake-js field and install field appropriately with a single command or Is their any way we can pass these command from java-script file.

I want something like
npm run install32bit / install64bit

0

There are 0 answers