Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G gulp
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gulp
  • gulp
  • Issues
  • #92
Closed
Open
Issue created Jan 05, 2014 by Administrator@rootContributor

gulp runs all tasks, not just default

Created by: enyo

I have this gulpfile:

// Include gulp
var gulp = require('gulp'); 

// Include Our Plugins
var myth = require('gulp-myth');

var cssSourceFiles = __dirname + '/css_source/*.css';
var cssTarget = __dirname;

// Lint Task
gulp.task('myth', function() {
  gulp.src(cssSourceFiles)
    .pipe(myth())
    .pipe(gulp.dest(cssTarget));
});

// Lint Task
gulp.task('watch', function() {
  gulp.watch(cssSourceFiles, function(){
    gulp.run('myth');
  });
});

// Default Task
gulp.task('default', function(){
  gulp.run('myth');
});

And when I execute gulp, it runs all tasks consecutively:

$ gulp
[gulp] Using file /Volumes/CaseFS/wetopo/tool/Gulpfile.js
[gulp] Working directory changed to /Volumes/CaseFS/wetopo/tool
[gulp] Running 'myth'...
[gulp] Finished 'myth' in 2.85 ms
[gulp] Running 'watch'...
[gulp] Finished 'watch' in 4.33 ms
[gulp] Running 'default'...
[gulp] Running 'myth'...
[gulp] Finished 'myth' in 462 μs
[gulp] Finished 'default' in 1.25 ms

If I remove the default task, it just runs myth and watch consecutively, and does not error.

Assignee
Assign to
Time tracking