A
A
Alex_proger2016-12-12 19:21:42
JavaScript
Alex_proger, 2016-12-12 19:21:42

Why is gulp copy not copying files?

For reasons assumed for me, gulp copy does not copy files from 1 directory to another, tell me what should be given to the plugin in the argument.

const gulp = require('gulp');
const copy = require('gulp-copy');

let paths = {
    build: {
        html: 'public/',
        js: 'public/js/',
        css: 'public/css/',
        img: 'public/img/',
        jsLibs: 'public/js/libs/'
    },
    src: {
        html: 'assets/*.html',
        js: 'assets/js/main.js',
        style: 'assets/styles/*.css',
        img: 'assets/img/*.*',
        jsLibs: 'assets/js/libs/libs.js'
    },
    watch: {
        html: 'assets/**/*.html',
        js: 'assets/js/',
        jsLibs:'assets/js/libs',
        css: 'assets/css/',
        img: 'assets/img/'
    },
    clean: 'public'
};

gulp.task('copy:img', function(){
    return gulp.src(paths.src.img)
// Я так полагаю, нужно ему что то дать, если это папка для выгрузки файлов, я nerd )))
        .pipe(copy())
        .pipe(gulp.dest(paths.build.img));
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Korotaev, 2016-12-12
@Alex_proger

there is even a readme about it https://www.npmjs.com/package/gulp-copy

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question