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 : multiple libs for one app
Adding files to gulpfile.js with ASP.NET 5
Karma/jasmine testing error: “Uncaught TypeError: Unexpected anonymous System.register call.”
when I run (npm install gulp-msbuild) inside the Package Manager Console (VS2015), it throws warning
Gulp-kss issues
Browserify - accurate build log in terminal with o: --colors, silimar to webpack
Minimist not finding arguments
Gulp.js. Same task on watch, with different parallel tasks
Split css for different devices
Gulpfile not working when module.exports references a Gulp task not a function?
Use gulp to process bowser files
Getting an error when trying to serve the app using browser-sync
Can't Sprite using gulp.spritesmith
How can I make build variables available to all JS files in gulp?
Gulp not installed globally?
gulp-useref deep folders error

Categories

HOME
indexing
apache-storm
phantomjs
magento-1.9.2.1
stdout
datetimepicker
xss
uml-designer
atlassian-fisheye
autocad
sequence
install
google-search-appliance
distinct
point-of-sale
browsermob
dompdf
samba
orange
novacode-docx
single-page-application
datasource
tcpdf
policy
grunt-contrib-uglify
formtastic
libxml2
marionette
javapns
ios9
lines
akamai
zimbra
wit-ai
azure-vm-scale-set
device-driver
scip
mockserver
server-side-swift
apiman
taleo
angular-fullstack
ng-class
dna-sequence
enet
webmatrix
trusted-computing
spring-cloud-aws
scrollmagic
stripes
visual-web-developer
altova
normalisation
vitamio
angularfire
django-celery
mod
jmap
bbedit
markerspiderfier
gtkwave
fileinputstream
pymol
dockerpy
system.io.packaging
grunt-contrib-connect
illegalargumentexception
ios-enterprise
oxygenxml
serializer
disabled-control
smartxls
webshim
opencobol
farpoint-spread
pidgin
grunt-wiredep
pechkin
dynamic-expresso
phone-state-listener
dnsbl
feincms
volatility
linear-interpolation
report-viewer2010
nserror
facebook-winjs-sdk
yii-cactiverecord
httppostedfilebase
digg
qvariant
nscharacterset
webdb
hp-trim
dgml
dynamic-scope
dojox.gfx
manuals
authkit
disk-based
jettison
moores-law
tracd

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