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 显示和隐藏 div? 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
