We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9f5ec9f + 99402ef commit ce8e94cCopy full SHA for ce8e94c
docs/recipes/README.md
@@ -22,3 +22,4 @@
22
* [Browserify + Globs](browserify-with-globs.md)
23
* [Output both a minified and non-minified version](minified-and-non-minified.md)
24
* [Templating with Swig and YAML front-matter](templating-with-swig-and-yaml-front-matter.md)
25
+* [Exports as tasks](exports-as-tasks.md)
docs/recipes/exports-as-tasks.md
@@ -0,0 +1,20 @@
1
+# Exports as Tasks
2
+
3
+Using the ES2015 module syntax you can use your exports as tasks.
4
5
+```js
6
+import gulp from 'gulp';
7
+import babel from 'gulp-babel';
8
9
+// named task
10
+export function build() {
11
+ return gulp.src('src/*.js')
12
+ .pipe(babel())
13
+ .pipe(gulp.dest('lib'));
14
+}
15
16
+// default task
17
+export default function dev() {
18
+ gulp.watch('src/*.js', ['build']);
19
20
+```
0 commit comments