Search code examples
gulpgitignore

Should Gulp clean the source path?


I have the following code to generate my files in my gulpfile.js:

var config = {
    dist: "./WebApplication/Assets/dist",
    source: "./WebApplication/Assets/"
};

/* ************************ Clean ************************ */
gulp.task("clean", function () {
    return gulp.src(config.dist + "/*", { read: false })
    .pipe(clean({force:true}));
});

My question is, should I clean the source from the project as well, or at least ignore it in my .gitignore file?


Solution

  • I don't know all your project's context, but as I understand it, you don't have to clean your source, otherwise it will remove all your assets and not only your buildt files as current.