File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 2222* [ Browserify + Globs] ( browserify-with-globs.md )
2323* [ Output both a minified and non-minified version] ( minified-and-non-minified.md )
2424* [ Templating with Swig and YAML front-matter] ( templating-with-swig-and-yaml-front-matter.md )
25+ * [ Exports as tasks] ( exports-as-tasks.md )
Original file line number Diff line number Diff line change 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+ ```
You can’t perform that action at this time.
0 commit comments