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
|
|
|
});
|
|
|
|
|
2016-06-05 17:46:52 -04:00
|
|
|
gulp.task('clean', function () {
|
2015-10-23 15:47:20 -04:00
|
|
|
var cleanPath = path.join(_outputFolder, '**/*.*');
|
2016-06-05 17:46:52 -04:00
|
|
|
del([ cleanPath, '!**/*.ovr.*']).then(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
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
gulp.task('default', taskListing);
|
|
|
|
|