4
4
4ipS2016-11-19 03:40:28
gulp.js
4ipS, 2016-11-19 03:40:28

How to use gulpzip?

Hello. Help, otherwise I'm already confused
. I have the following folder structure:

/assets
  /css
  /js
/node_modules
/wp
index.html

gulp task:
gulp.task('deployment', function() {
    return gulp.src(['assets/**/*', 'index.html'])
        .pipe(zip('_files.zip'))
        .pipe(gulp.dest('./'));
});

why in my archive everything from the assets folder is in the root, and not in the same folder?
Thank you

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2016-11-19
@4ipS

And so?

gulp.task('deployment', function() {
    return gulp.src(['assets/**/*', 'index.html'], { base: '.' })
        .pipe(zip('_files.zip'))
        .pipe(gulp.dest('./'));
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question