gulp


Gulp dependant task not working properly


I have two gulp tasks, one to compile stylus files and the other is to clean my css files but I don't understand why only clean-styles run when I executed the command: gulp styles on the terminal.
gulp.task("clean-styles", function (done) {
clean(config.css + "**/*.css", done);
});
gulp.task("styles", ["clean-styles"], function () {
return gulp.src(config.styles)
.pipe($.plumber())
.pipe($.stylus())
.pipe(gulp.dest(config.css));
});
function clean(path, done) {
del(path, done);
}
I"m using Gulp version 3.9.0 I've done this on multiple project in the past and it seems to be working.
I'm not sure what I'm doing wrong. There are no errors in the console.
Expected Result:
I expect styles to run after the clean-styles task.
Actual Result: Only clean-styles run.
Thanks #kombucha for the heads up. It seems to be a change in the del package which caused this to no longer work.
gulp.task("clean-styles", function (done) {
clean(config.css + "**/*.css", done);
});
gulp.task("styles", ["clean-styles"], function () {
return gulp.src(config.styles)
.pipe($.plumber())
.pipe($.stylus())
.pipe(gulp.dest(config.css));
});
New Clean function:
function clean(path, done) {
del(path).then(function (paths) {
console.log("Cleaning: " + paths);
done();
});
}

Related Links

Gulp: insert content from file into script
Material-ui not working in Safari only with Gulp-compass
Gulp loops for generate sprite by folder
Pass Parameter to Gulp Task
My default gulp task is not executing other tasks
Gulp Browserify SourceMaps
What is the purpose(s) of JavaScript build tools
gulp-jshint utters errors when using browserify
Gulp “watch” is not running the sub task “sass” on file change
Proxy URL not working with BrowserSync Gulp task
the task can't be called by watch module.
I can't get the data-uri() function to work on gulp.js to base64 an image on mac
How to inject bower dependencies in karma.conf.js file with gulp?
Getting Libsass Gulp Susy to work together
Gulp compass without config.rb
gulp-webserver: Default to index.html if available, else show directories

Categories

HOME
ckan
intellij-idea
network-programming
openacc
dynamic
postsharp
artifactory
symfony-sonata
mediarecorder
yuv
pdf-generation
obd-ii
spring-data-solr
apache-httpclient-4.x
select2
mamp
desktop-application
captcha
expo
box2d
owncloud
ringcentral
gomobile
descriptor
minimagick
formulas
screen-scraping
rvm
gulp-jshint
mex
hierarchical-data
scripting-language
slim-lang
fastadapter
intersection
mkdir
gstreamer-1.0
rythm
socketcluster
aspnetboilerplate
web-technologies
opos
stanford-nlp-server
flask-socketio
beanshell
dynamic-linking
ajv
nservicebus6
multi-targeting
cc
reloaddata
blackberry
nsalert
spring-cloud-aws
breadcrumbs
blitz3d
copy-constructor
dbi
class-design
particle-system
php-java-bridge
transaction-isolation
3d-rendering
phpdesigner
alchemy
jsondoc
apache2-module
videoview
recode
taverna
azure-mobile-app
litedb
autopep8
pymol
nsq
dojox.grid
aiff
launcher
clearcanvas
javacompiler
dotcmis
drawable
disabled-control
dateadd
webshim
nodeunit
data-layers
lastinsertid
thucydides
code-complete
ardor3d
aspnet-compiler
xrandr
removeall
exi
codeigniter-form-helper
pudb
nx
feincms
freeimage
esi
netbiscuits
states
nserror
fileoutputstream
recess
service-layer
moss2007-security
conditional-operator
mediastreamsource
text-manipulation
expander
unauthorized
cross-cutting-concerns
memory-consumption

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App