Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAlbert Boehm
5,878 PointsInstead of adding gulp.start("clean") to the default task callback,can we make "clean" a dependency of the "build" task?
If so, do these methods differ in any way? Does one of them have any advantages or disadvantages over the other?
Thank you :-)
1 Answer
Neil McPartlin
14,662 PointsBased on my understanding so far, I'd say the answer is no, or not easily. In the video, the build task is written so that both 'minifyScripts' and 'compileSass' could start at the same time EXCEPT 'minifyScripts' must wait until 'concatScripts' has finished.
Now all 3 of these tasks create files that would be deleted by 'clean', so somehow 'clean' must run before any of these 3 tasks run. Making all 3 dependent on 'clean' will not work, because all 3 do not start together and even if they did, clean may run 3 times I guess.
If we could get this working, we would still need to type 'gulp build' whereas as Huston says, the goal is for us to just need to use the default option so that all we need to type is 'gulp'.