I have a doubt how to minify every file in the /src into a unique one .min.js First I know how I can do it in a particular folder for instance: "/src/services/*js" this away it will minify all files from services into a one. But What if I intend to minify all files from all folders into a unique one? My tasks are now minify from folder to folder, exemple:
gulp.task('services', () => {
return gulp.src('.src/services/*.js')
.pipe(plumber())
.pipe(uglify())
.pipe(concat(`services.js`))
.pipe(rename({ suffix: '.min.js' }))
.pipe(gulp.dest('./dist/services'));
});
Another questions:
1- How can I fix required folders, if all files and all folders are into one, require folders should be removed, how can I do it?
const fileUtil = require('./src/utils/fileUtil');
2- Should I have functions which has the same name, to not have a conflic when all files get together, actually now in services and repositories there is some functions with same name
I know it's many question to a single topic but I'm new gulp user and I have too many questions to do the best practices