Skip to content

package.json 相关

1. 支持windows和linux执行不同的脚本

json
"scripts": {
  "clean:win": "rmdir /s /q build",
  "clean:unix": "rm -rf build",
  "clean": "node -e \"require('child_process').execSync(process.platform === 'win32' ? 'npm run clean:win' : 'npm run clean:unix', { stdio: 'inherit' })\""
}