嗨,我需要一些
lint & tests
脚本,在yarn build
之前执行,在gitlab管道中。
package.json
中的脚本很简单:prebuild: CI=true npm test && npm run lint,
build: react-scripts build
每次运行
prebuild
时,yarn build
脚本都会运行,但我需要区分它何时在本地运行和何时在 CI/CD 中运行。
是否有可以做到这一点的标志或参数,或者 package.json 的文档?
谢谢。