2015-10-23 15:47:20 -04:00
|
|
|
var gulp = require('gulp');
|
|
|
|
var path = require('canonical-path');
|
|
|
|
var del = require('del');
|
|
|
|
var taskListing = require('gulp-task-listing');
|
|
|
|
|
|
|
|
var exampleZipper = require('../exampleZipper');
|
|
|
|
|
|
|
|
var _outputFolder = '_zip-output';
|
|
|
|
|
|
|
|
gulp.task('help', taskListing);
|
|
|
|
|
|
|
|
gulp.task('zipExamples', ['clean'], function() {
|
2015-11-04 05:00:12 -05:00
|
|
|
return exampleZipper.zipExamples("../../../public/docs/_examples", _outputFolder);
|
2015-10-23 15:47:20 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('clean', function (cb) {
|
|
|
|
var cleanPath = path.join(_outputFolder, '**/*.*');
|
|
|
|
del([ cleanPath, '!**/*.ovr.*'], function (err, paths) {
|
2015-11-04 05:00:12 -05:00
|
|
|
console.log('Deleted files/folders:\n', paths.join('\n'));
|
2015-10-23 15:47:20 -04:00
|
|
|
cb();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
gulp.task('default', taskListing);
|
|
|
|
|