Questions tagged [gulp-task]

gulp.task([name,] fn) - defines the task

gulp.task(name) - returns the task (defined early)

Tasks API includes those functions:

  • gulp.series
  • gulp.parallel
  • gulp.lastRun

https://gulpjs.org/API.html#gulp-task-name-fn

32 questions
0
votes
0 answers

Updated gulp to gulp 4 but can't figure out how to make simple-task-loader work

First of all, this may seem a dumb/noob question, but I'm more of a backend developer and I don't really work with npm and node that often. I was just used to start gulp watch and I was ready to go theming/styling. So i just upgraded to gulp 4 with…
Skywalker
  • 11
  • 3
0
votes
0 answers

How to get Gulp v4 watch observe file changes?

Here is a very minimalistic example gulpfile.js: var gulp = require('gulp'); function foo(done) { console.log('change'); done(); } function watchFiles() { console.log('starting watching...'); gulp.watch('./gulpfile.js',…
automatix
  • 14,018
  • 26
  • 105
  • 230
0
votes
1 answer

Gulp task is not working and even not shows any error

I just started learning gulp here I had written the task and run after run the task nothing is changed in my CSS file vendor prefixes are not added. I'm trying to add vendor prefixes and compress my CSS files. Can anyone suggest me. Is there my…
Husna
  • 1,286
  • 4
  • 19
  • 48
0
votes
1 answer

Issue in running gulp.series()

I have task to minify the JS files when it's in production function scriptsToMinify() { if(require('yargs').argv.production) { return gulp.src(src.JSFile) .pipe(sourcemaps.init()) .pipe(ngAnnotate( { remove: true, add: true, …
krrr25
  • 681
  • 2
  • 12
  • 29
0
votes
1 answer

browserSync works without sass file

The browserSync runs fine but the sass isn't getting reloaded and I can't see my changes reloads automatically in the browser. Basically It doesn't reload when I re-run gulp start in the terminal. I'm using Gulp 4, here is my index.js. Help me…
user11272367
0
votes
1 answer

nodemon + browserSync gulp task causes EADDRINUSE :::3000 error

I am having issues creating a nodemon + browserSync via gulp task. I have searched online for a possible solution. I looked on StackOverflow site, but I still have not found any success to a solution for my issue. I am running into this issue…
ajoloo
  • 1
  • 3
0
votes
1 answer

Gulp 4 task with node-mysql2 module causing server crash on connect

I have a need to run mysql queries within gulp to check certain fields in a table. I currently connect to a development server via ssh tunnel, which is opened via terminal so that my host is set to 'localhost'. When I execute a connection attempt,…
0
votes
1 answer

Gulp task for add one new line to particular file

How to add one line to required file using gulp task? This is my file: export { NumericTextBoxComponent} from './numerictextbox/numerictextbox.component'; export { NumericTextBoxModule } from './numerictextbox/numerictextbox.module'; export {…
Kumaresan Sd
  • 1,399
  • 4
  • 16
  • 34
0
votes
1 answer

How to increase log level of Node.js app on Docker image?

I already have AngularJS - Node.js app running localy and I can see logs of all levels on my browser after write in my code: console.log/info/error. After dockerize my app and run docker image (docker-compose up), on my browser console I can see…
TheHorizon
  • 145
  • 1
  • 16
0
votes
3 answers

how to run gulp tasks in order?

I am trying to concat all the css files into one released css file by running task: gulp.task('task one', () => { gulp.src([Dir + "**/*.css"]) .pipe(concat(outFilename + ".css")) .pipe(gulp.dest(destDir)); }); After that,…
Kevin
  • 272
  • 5
  • 21
0
votes
0 answers

How to setup Gulp task for multi level folder structure

Folder Structure Please refer below two images for folder structure. https://i.stack.imgur.com/5aEzi.png | https://i.stack.imgur.com/Hsapz.png How can we write a task in root gulfile.js (without creating gulpfile.js for each and individual folder)…
0
votes
1 answer

Gulp watch callback task not firing

I'm trying to set up a gulp-watch which triggers a gulp task when some files change. For this purpose I'm using the following code: gulp.task('watchChanges', function(cb){ console.log("Looking for file changes in " + watchPath+"."); …
0
votes
1 answer

gulp task runner msbuild fails, but works in cmd

I have a project where Gulp task runner is setup. Everything works perfectly fine in VS2015, but when I upgraded to VS2017 MSBuild started to fail. The funny thing is, that if I copy out the command line that apparently fails and paste it into the…
M.frank
  • 145
  • 2
  • 14
0
votes
1 answer

Merge multiple files css into a one file by classes with gulp

Combine CSS files Hi all, I'm working with a project in react and I use sass to process styles, I have several scss files and I group them using gulp, I use gulp-sass to generate the css and gulp-merge-css to join them, but they concatenate, not it…
0
votes
1 answer

How to use gulp-defer in gulp task?

I am having the issue the javascript is loaded before the page contents are loaded so decided to use the gulp-defer package in my gulptask. Here is the code // including plugins var gulp = require('gulp') defer = require("gulp-defer"); //…
Ramyachinna
  • 413
  • 1
  • 8
  • 20