How can I use the path from gulp.src() in gulp.dest()?

in your src set the base option and it will maintain the original path of your less file. gulp.task(‘compileLess’, function () { gulp.src(‘./*/less/*.less’, {base: ‘./’}) .pipe(less()) .pipe(gulp.dest( ‘./dist’ )); }); The ./dist destination can be anything. Wherever you want your file structure to be placed. Additional info here: https://github.com/wearefractal/glob-stream#options

Have sass-lint ignore a certain line?

Disabling through comments Update per December 2016 according to the docs this will now be possible using this syntax: Disable more than 1 rule for entire file // sass-lint:disable border-zero, quotes p { border: none; // No lint reported content: “hello”; // No lint reported } Disable a rule for a single line p { … Read more

Gulp error: gulp.hasTask is not a function

Gulp v4 has breaking changes and that creates some problems with run-sequence package. As I do not have your gulpfile.js, all I can say upto this point is to try to use Gulp4’s gulp.series and gulp.parallel with your gulp tasks, instead of run-sequence. you may receive an error of the sort of like ‘task1, ‘task2′ … Read more

Running a shell command from gulp

gulp-shell has been blacklisted. You should use gulp-exec instead, which has also a better documentation. For your case it actually states: Note: If you just want to run a command, just run the command, don’t use this plugin: var exec = require(‘child_process’).exec; gulp.task(‘task’, function (cb) { exec(‘ping localhost’, function (err, stdout, stderr) { console.log(stdout); console.log(stderr); … Read more

How can I write a simple gulp pipe function?

Well, you don’t need to use fs here, you already got the stream of file (here your chunk). Another point, you’re not sending back to the pipe the files, so I guess that’s why nothing is called on your second one. const through = require(‘through2’) gulp.src(sources) .pipe(through.obj((chunk, enc, cb) => { console.log(‘chunk’, chunk.path) // this … Read more

How to debug a Gulp task?

With Node.js version 6.3+ you can use the –inspect flag when running your task. To debug a gulp task named css: Find out where your gulp executable lives. If gulp is installed locally, this will be at node_modules/.bin/gulp. If gulp is installed globally, run which gulp (Linux/Mac) or where gulp (Windows) in a terminal to … Read more

Gulpjs combine two tasks into a single task

I think the proper way of doing this is using task dependency. In gulp you can define tasks that needs to be run before a given task. For instance: gulp.task(‘scripts’, [‘clean’], function () { // gulp.src( … }); When doing gulp scripts in the Terminal, clean is run before the scripts task. In your example … Read more

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