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
4
votes
0 answers

Gulp re-processes unchanged files

I'm experiencing long (~30s) rebuilds of several of my gulp tasks. I'm first transpiling using babel, then uglifying and finally concatenating the respective files. I determined that most of the time is spent on uglifying -- so I'm skipping the…
Joe - GMapsBook.com
  • 15,787
  • 4
  • 23
  • 68
4
votes
0 answers

write callback called multiple times

When I run my gulp task I am getting an error, which is as follows: Potentially unhandled rejection [2] Error: write callback called multiple times It is probably related with this line of code, due to it working with this…
altandogan
  • 1,245
  • 6
  • 21
  • 44
4
votes
1 answer

How to pass an argument from a gulp watcher to a task

If I have a watcher like this: gulp.watch('js/**/*.js').on('change', path => { gulp.series(build, reload)(); }); ...and task build would look like this: const build = done => { return gulp .src(path) // Use "path" here .pipe( …
user10392874
2
votes
1 answer

How to assign a name to an anonymous gulp (v4) task

I am using gulp for the first time now and followed the recommendation of gulp and exported my gulp tasks. It is running and the results are as expected. However on my console, the tasks are listed as . How can I assign a name to exported gulp…
ingoBe
  • 57
  • 6
2
votes
1 answer

TypeError ... is not a function

I have installed gulp-run-command as follows: npm install gulp-run-command I'm running a series of gulp tasks. All the others work, except this one. Here's the task where I'm running gulp-run-command: var gulp = require('gulp'); var run =…
Steve Waters
  • 3,348
  • 9
  • 54
  • 94
1
vote
0 answers

Set gulp-usemin task to build the content of src folder, but not create another src folder into dist

So, I have the follow project structure ├── gulpfile.js ├── output.txt ├── package-lock.json ├── package.json └── src ├── assets | ├── css | ├── img | ├── js | └── pages └── index.html And the follow gulp…
1
vote
1 answer

Task 'createSprite, copySpriteCSS' is not in your gulpfile

I am trying to run task 'icons' which is going to run two different tasks at the same time, but when I try running it, I get the error message. I've tried many different things to do, but unsuccessfully, so if anyone has an idea how to fix it,…
1
vote
0 answers

Error on gulp build during migration from gulp v3 to v4

I've tried to migrate from gulp v3 to v4, according to my researches, I should change my gulpfile.js file. So, I tried it like this: gulp.task('clean-css', function (cb) { return rimraf(paths.css, cb); }); to gulp.task('clean-css',…
Taras
  • 45
  • 4
1
vote
0 answers

Migration from gulp v3 to v4

I've tried to migrate from gulp v3 to v4, but when I write 'gulp build' I get such error D:\Projects\Exo\exo\src\COG.SRM\node_modules\undertaker\lib\set-task.js:10 assert(typeof fn === 'function', 'Task function must be specified'); ^…
Taras
  • 45
  • 4
1
vote
2 answers

How to only run a gulp.task locally?

I have the following gulp function: // TODO: Comment for production. gulp.task('startServer', function() { return connect.server({ root: './dist', port: 8080 }); }); Every time I pull it to work on it locally, I have to uncomment the…
Joe Berthelot
  • 725
  • 4
  • 16
  • 33
1
vote
1 answer

How to generate coverage report through gulp task in Angular 4?

I have tried so many plugins for writing gulp task to generate coverage report in Angular 4 but no-one was working. All documentation is for javascript files and in angular 4 we have typescript files. Once I tried converting all my ts files to js…
arctic_Oak
  • 974
  • 2
  • 13
  • 29
1
vote
0 answers

Gulp task with arguments (loop call wit another args)

I wanna call gulp task with different argument or with changed data. For example: I have list (names). I need repeatedly (Array length) call task by rotation with list[index] item. Something, like: var name = 'MyName', secondName =…
SayFix
  • 29
  • 3
1
vote
1 answer

Dynamic gulp.dest path for modular app

I'm trying to setup gulp for a modular application. In my public folder, I have modules each with their own src/sass and dist/css folders. I want to transform and transfer the sass files from src/sass to their respective dist/css folder. There could…
S. Lacroix
  • 11
  • 3
1
vote
1 answer

gulp: build the code and start it in the browser

So I want to use elm language for a web project and I need the project to be in visual studio 2015 and I am using gulp. My issue is that I don't know how to create a gulp task that builds the code and starts it in the browser. Here is what I've done…
Buda Gavril
  • 21,409
  • 40
  • 127
  • 196
0
votes
1 answer

How can I use Gulp to build all projects under a specific folder within my ASP.NET MVC solution?

I have MVC solution with below structure MainSolution FeatureFolder Project1 Project2 Project3 FoundationFolder Project4 Project5 I want to build all the projects under Feature Folder by using…
shahul
  • 11
  • 2
1
2 3