N
N
Nikolay2018-12-26 13:25:44
gulp.js
Nikolay, 2018-12-26 13:25:44

I can not find a clue to the error, for further correction of it ... Help?

There are such tasks) Made in the same genre, but the difficulty is that one of the examples is working, and the other two are not working)
The first two are not working.

gulp.task('libCss:build', function() {
  var res_css_arr = '';
  var res_css_count = pathsLibrary.libcss.libaray.length;
  for(var i_css = 0; res_css_count > i_css; i_css++) { res_css_arr += pathsLibrary.libcss.libaray[i_css] + '.css,'; }
  return gulp.src(res_css_arr.split(','))
    .pipe(concat(pathsLibrary.libcss.cssname + '.min.css'))
    .pipe(csso())
    .pipe(gulp.dest(pathsLibrary.libcss.pay_css));
});

gulp.task('libIe:build', function() {
  var res_ie_arr = '';
  var res_is_count = pathsLibrary.libjs.libIe.length;
  for(var i_ie = 0; res_is_count > i_ie; i_ie++) res_ie_arr += pathsLibrary.libjs.libIe[i_ie] + '.js,';
    return gulp.src(res_ie_arr.split(','))
    .pipe(concat(pathsLibrary.libjs.iename + '.min.js'))
    .pipe(uglify())
    .pipe(gulp.dest(pathsLibrary.libjs.pay_js));
});

But if we do this! Does everything work?
gulp.task('libCss:build', function() {
  var res_css_arr = '';
  var res_css_count = pathsLibrary.libcss.libaray.length;
  for(var i_css = 0; res_css_count > i_css; i_css++) { res_css_arr += pathsLibrary.libcss.libaray[i_css] + '.css'; }
  return gulp.src(['source/asstes/libarays/normalize-css/normalize.css','source/asstes/libarays/fancybox/jquery.fancybox.css',])
    .pipe(concat(pathsLibrary.libcss.cssname + '.min.css'))
    .pipe(csso())
    .pipe(gulp.dest(pathsLibrary.libcss.pay_css));
});

gulp.task('libIe:build', function() {
  var res_ie_arr = '';
  var res_is_count = pathsLibrary.libjs.libIe.length;
  for(var i_ie = 0; res_is_count > i_ie; i_ie++) res_ie_arr += pathsLibrary.libjs.libIe[i_ie] + '.js,';
    return gulp.src('source/asstes/libarays/html5shiv/es5-shim.min.js','source/asstes/libarays/html5shiv/html5shiv.min.js','source/asstes/libarays/html5shiv/html5shiv-printshiv.min.js','source/asstes/libarays/respond/respond.min.js')
    .pipe(concat(pathsLibrary.libjs.iename + '.min.js'))
    .pipe(uglify())
    .pipe(gulp.dest(pathsLibrary.libjs.pay_js));
});

And this one works some kind of mystic!)
gulp.task('libJs:build', gulp.parallel('libUser:build', 'libCss:build', 'libIe:build'), function() {
  var res_js_arr = '';
  var res_js_count = pathsLibrary.libjs.libaray.length;
  for(var i_js = 0; res_js_count > i_js; i_js++) res_js_arr += pathsLibrary.libjs.libaray[i_js] + '.js,';
    return gulp.src( res_js_arr.split(',') )
    .pipe(concat(pathsLibrary.libjs.jsname + '.min.js'))
    .pipe(uglify())
    .pipe(gulp.dest(pathsLibrary.libjs.pay_js));
});

What's wrong? The paths are all right. Perhaps it's all about the split() functions? In the old version of gulp, this worked for me)
It gives the following error.5c2359b5b63b6826011828.jpeg

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question