@@ -149,13 +149,12 @@ const paths = {
149
149
};
150
150
151
151
/*
152
- * For small tasks you can use arrow functions and export
152
+ * For small tasks you can export arrow functions
153
153
*/
154
- const clean = () => del ([ ' assets' ]);
155
- export { clean };
154
+ export const clean = () => del ([ ' assets' ]);
156
155
157
156
/*
158
- * You can still declare named functions and export them as tasks
157
+ * You can also declare named functions and export them as tasks
159
158
*/
160
159
export function styles () {
161
160
return gulp .src (paths .styles .src )
@@ -177,13 +176,21 @@ export function scripts() {
177
176
.pipe (gulp .dest (paths .scripts .dest ));
178
177
}
179
178
180
- export function watch () {
179
+ /*
180
+ * You could even use `export as` to rename exported tasks
181
+ */
182
+ function watchFiles () {
181
183
gulp .watch (paths .scripts .src , scripts);
182
184
gulp .watch (paths .styles .src , styles);
183
185
}
186
+ export { watchFiles as watch };
184
187
185
- const build = gulp .series (clean, gulp .parallel (styles, scripts));
186
- export { build };
188
+ /*
189
+ * You can still use `gulp.task`
190
+ * for example to set task names that would otherwise be invalid
191
+ */
192
+ const clean = gulp .series (clean, gulp .parallel (styles, scripts));
193
+ gulp .task (' clean' , clean);
187
194
188
195
/*
189
196
* Export a default task
0 commit comments