For example, I want to install a certain module on both mac and win, but not install a certain module on the linux platform. How to set it up? Is it possible?
Replenish
I finally found that it can be done using shell script
#!/bin/bash
echo "正在安装 electron ……"
npm install electron-prebuilt@1.2.1
echo "electron 安装完成"
echo "正在安装 async ……"
npm install async@2.0.1
echo "async 安装完成"
package.json
I don’t know if it can be done, but it can be implemented using a script.node index.js
Now you can install XXXhttps://docs.npmjs.com/files/...
Just indicate it in optionalDependencies