Gulp.js conventions for tasks names(任务名称的 Gulp.js 约定)
问题描述
在编写 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 约定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:任务名称的 Gulp.js 约定


- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- Fetch API 如何获取响应体? 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- addEventListener 在 IE 11 中不起作用 2022-01-01
- 失败的 Canvas 360 jquery 插件 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06