Get the current file name in gulp.src()

I’m not sure how you want to use the file names, but one of these should help: If you just want to see the names, you can use something like gulp-debug, which lists the details of the vinyl file. Insert this anywhere you want a list, like so: var gulp = require(‘gulp’), debug = require(‘gulp-debug’); … Read more

Everytime I run gulp anything, I get a assertion error. – Task function must be specified

Gulp 4.0 has changed the way that tasks should be defined if the task depends on another task to execute. The list parameter has been deprecated. An example from your gulpfile.js would be: // Starts a BrowerSync instance gulp.task(‘server’, [‘build’], function(){ browser.init({server: ‘./_site’, port: port}); }); Instead of the list parameter they have introduced gulp.series() … Read more

Pass Parameter to Gulp Task

It’s a feature programs cannot stay without. You can try yargs. npm install –save-dev yargs You can use it like this: gulp mytask –production –test 1234 In the code, for example: var argv = require(‘yargs’).argv; var isProduction = (argv.production === undefined) ? false : true; For your understanding: > gulp watch console.log(argv.production === undefined); <– … Read more

Gulp error: The following tasks did not complete: Did you forget to signal async completion?

Since your task might contain asynchronous code you have to signal gulp when your task has finished executing (= “async completion”). In Gulp 3.x you could get away without doing this. If you didn’t explicitly signal async completion gulp would just assume that your task is synchronous and that it is finished as soon as … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)