twolfson / gulp.spritesmith

Convert a set of images into a spritesheet and CSS variables via gulp
The Unlicense
1.07k stars 81 forks source link

gulp-If. How to check if js file contains specific property? #141

Closed junaidahmed92 closed 6 years ago

junaidahmed92 commented 6 years ago

I am using gulp.js. But I want to add a condition that if request.debug = true; in any of my js file then gulp task should fail. I have found gulp-if and gulp-fail that I can use for this purpose but I don't know that how can I check the specific condition? Thanks

twolfson commented 6 years ago

I don't understand the question. Is this about gulp.spritesmith or gulp in general?

junaidahmed92 commented 6 years ago

@twolfson , it's about gulp in general. Like I want to see if any of my js file contains specific string then I just want to fail gulp task

twolfson commented 6 years ago

Sorry, I've never dealt with this scenario before so I don't have any ideas off the top of my head. Since this is off topic from gulp.spritesmith, I'm going to close this issue as a wontfix

I recommend you look at gulp, gulp-if, gulp-fail issue pages as well as searching StackOverflow