Closed holic closed 10 years ago
Can I see your gulp task that's using these globs?
Sure!
gulp.task "clean", ->
gulp.src ["jekyll/assets", "!jekyll/assets/images/content"], read: no
.pipe clean()
Replace that glob array with any of the arrays above.
Why don't you do that in each task and only for the folders the task touches?
Can you provide an example of how that might work for concat'ing JS files and compiling CSS?
To me, it doesn't really make sense to clean up within each task when the target files will be overwritten by the end of the task anyway.
Have you tried using the del
module for deleting files and folders? I don't recommend using gulp-clean
I have a directory structure that looks a bit like this:
All but
assets/images/content/*
are generated by Gulp. The contents ofassets/images/content/
are copied from another location via bash script. I'd like to clean the Gulp-generated files, but leave the files inassets/images/content/
.I've tried the following globs to no avail:
["assets", "!assets/images/content"]
["assets", "!assets/images/content/**"]
["assets/**", "!assets/images/content"]
["assets/**", "!assets/images/content/**"]
And eventually found that specifying all the paths explicitly works: