Chrome Extension

Copy multiple files Gulp

var gulp = require('gulp');

gulp.task('copy_files', function() {
    return gulp.src([
            'app/icon.png', 
            'app/manifest.json', 
            'app/index.html', 
            'app/filename.js'
            ]).pipe(gulp.dest('dist'))
});
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool

You can copy multiple files from one folder to another folder using gulp. The code snippet gets files multiple files from the app folder and passes them in an array as gulp.src parameter. We are copying these files into the dist folder. You can change the folder name as per your requirements.

Was this helpful?
0 Comments