gpt4 book ai didi

javascript - 如何设置交叉环境变量以在提交前开始测试?

转载 作者:行者123 更新时间:2023-11-28 21:35:38 24 4
gpt4 key购买 nike

我已配置为在提交前运行测试。但它只适用于 Ubuntu。

这是我现在拥有的:

 "scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"test:all": "CI=true react-scripts test"
},
"husky": {
"hooks": {
"pre-commit": "npm run test:all"
}
},

如何设置交叉环境变量以在任何操作系统中运行它们?

最佳答案

使用 cross-env包裹:

  "test:all": "cross-env CI=true react-scripts test"

关于javascript - 如何设置交叉环境变量以在提交前开始测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59081894/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com