Skip to content

Commit

Permalink
fix gulp package #3693
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Oct 25, 2024
1 parent 95946b4 commit 96ca819
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const fs = require('fs');
const pkg = require('./package.json')
const glob = require('glob')
const yargs = require('yargs')
Expand Down Expand Up @@ -274,22 +275,23 @@ gulp.task('default', gulp.series(gulp.parallel('js', 'css', 'plugins'), 'test'))

gulp.task('build', gulp.parallel('js', 'css', 'plugins'))

gulp.task('package', gulp.series(() =>

gulp.src(
[
'./index.html',
'./dist/**',
'./lib/**',
'./images/**',
'./plugin/**',
'./**/*.md'
],
{ base: './' }
)
gulp.task('package', gulp.series(async () => {

let dirs = [
'./index.html',
'./dist/**',
'./plugin/**',
'./*/*.md'
];

if (fs.existsSync('./lib')) dirs.push('./lib/**');
if (fs.existsSync('./images')) dirs.push('./images/**');
if (fs.existsSync('./slides')) dirs.push('./slides/**');

return gulp.src( dirs, { base: './' } )
.pipe(zip('reveal-js-presentation.zip')).pipe(gulp.dest('./'))

))
}))

gulp.task('reload', () => gulp.src(['index.html'])
.pipe(connect.reload()));
Expand Down

0 comments on commit 96ca819

Please sign in to comment.