'use strict';

var del = require('del'),
    gulp = require('gulp'),
    serve = require('gulp-serve'),
    staticSiteGenerator = require('..');

gulp.task('html', ['clean'], function() {
  return gulp.src('./src/site/**/*')
    .pipe(staticSiteGenerator({
      jadeOptions: {
        pretty: true
      }
    }))
    .pipe(gulp.dest('./dest'));
});

gulp.task('clean', function(done) {
  del('./dest').then(function() {
    done();
  });
});

gulp.task('watch', ['serve'], function() {
  gulp.watch('./src/@(site|layouts)/**/*', ['html']);
});

gulp.task('serve', ['html'], serve({
  root: './dest',
  port: 8080
}));

gulp.task('default', ['html']);

@@ -150,20 +150,19 @@
 p.task('
-html
+ssg
 ', %5B'cle
@@ -521,28 +521,27 @@
 s)/**/*', %5B'
-html
+ssg
 '%5D);%0A%7D);%0A%0Agu
@@ -559,20 +559,19 @@
 rve', %5B'
-html
+ssg
 '%5D, serv
@@ -638,12 +638,11 @@
 , %5B'
-html
+ssg
 '%5D);

update example gulpfile