更新时间:2024-04-03 GMT+08:00
使用yaml配置Yarn构建
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
version: 2.0 # 必须是2.0 steps: BUILD: - yarn: inputs: command: |- #nodejs 版本小于18时,可以设置下面的值 npm config set cache-folder /yarncache npm config set registry http://mirrors.tools.huawei.com/npm/ npm config set disturl http://mirrors.tools.huawei.com/nodejs npm config set sass_binary_site http://mirrors.tools.huawei.com/node-sass/ npm config set phantomjs_cdnurl http://mirrors.tools.huawei.com/phantomjs npm config set chromedriver_cdnurl http://mirrors.tools.huawei.com/chromedriver npm config set operadriver_cdnurl http://mirrors.tools.huawei.com/operadriver npm config set electron_mirror http://mirrors.tools.huawei.com/electron/ npm config set python_mirror http://mirrors.tools.huawei.com/python #nodejs 版本大于等于18时,可以设置下面的值 #npm config set registry http://mirrors.tools.huawei.com/npm/ npm config set prefix '~/.npm-global' export PATH=$PATH:~/.npm-global/bin #yarn add node-sass-import --verbose yarn install --verbose yarn run build tar -zcvf demo.tar.gz ./** |
参数名 |
参数类型 |
描述 |
是否必填 |
默认值 |
---|---|---|---|---|
command |
string |
执行命令。 |
是 |
无 |
父主题: 单任务配置