在编写 Gulpfile、命名任务、构建配置文件等方面是否有任何约定?
Are there any conventions for writing Gulpfiles, namespacing the tasks, structuring the config file etc?
也许可以从 Grunt 世界中汲取一些基本的常识性东西?
Maybe there are some basic common-sense things that can be taken from Grunt world?
您如何处理 Gulpfile 的结构化问题,就好像您要辞掉工作一样,下一个 JS 开发人员会来并直观地了解如何构建项目?
How do you deal with structuring the Gulpfile as if you were to quit your job and the next JS developer would come and intuitively understand how to build the project?
所以我们完成了按阶段对名称进行分组,在主要阶段的名称下嵌套子任务.
So we finished up with grouping the names by phase, nesting subtasks under the names of the main phases.
基本上我们使用策略从已经存在的其他语言(例如 gradle)的构建库中复制约定,因此我们流程的所有部分的构建命令都是相同的,每个人都可以弄清楚要做什么
Essentially we used strategy to copy conventions from build libraries of other languages (e.g. gradle) that were already in place, so build commands for all parts of our process would be the same and everybody could figure out what to
这导致:
build
...
build:compile
build:compile:less
...
test
test:unit
...
test:e2e
...
verify
...
release
release:copy
release:copy:fonts
这篇关于任务名称的 Gulp.js 约定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!