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