更新时间:2026-01-08 GMT+08:00

使用Grunt构建

使用Grunt构建JavaScript工程。

图形化构建

配置构建步骤中,添加“Grunt构建”构建步骤。

参数说明如下:

参数项

说明

步骤显示名称

构建步骤的名称,可自定义修改。

工具版本

根据需要选择工具版本。

命令

配置Grunt命令,一般使用系统默认生成的命令即可。如有特殊构建要求,可以在文本域中输入自定义的构建脚本。

代码化构建

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
ersion: 2.0 # 必须是2.0
steps:
  BUILD:
    - grunt:
       inputs:
          command: |-
                    npm config set registry http://7.223.219.40/npm/
                    #npm cache clean -f
                    #npm audit fix --force
                    npm install --verbose
                    grunt
                    npm run build

参数名

参数类型

描述

是否必填

默认值

command

string

执行命令。