Quite new to Gulp and would like to integrate PHP includes using MDBootstrap.
Here is part of my gulpfile.js
if that helps any...
// Live Server
gulp.task('live-server', function(done) {
console.log("Restarting server...");
browserSync.reload();
done();
});
function initBrowser(){
browserSync.init({
server: {
baseDir: "./dist/",
directory: true
},
notify: false
},function(){
console.log("asdasd");
});
}
// Watch on everything
gulp.task('mdb-go', function(done) {
initBrowser();
gulp.watch("**/*", {cwd: './dist/'}, gulp.parallel('live-server'));
gulp.watch("scss/**/*.scss", gulp.parallel('css-compile'));
gulp.watch(["dist/css/*.css", "!dist/css/*.min.css"], gulp.parallel('css-minify'));
gulp.watch("js/**/*.js", gulp.parallel('js-build'));
gulp.watch(["dist/js/*.js", "!dist/js/*.min.js"], gulp.parallel('js-minify'));
gulp.watch("**/*", {cwd: './img/'}, gulp.parallel('img-compression'));
});
EDIT
Directory structure:
Top of gulpfile.js:
It works flawlessly but I need to use PHP. I made a hacky gulpfile in the meantime using gulp-php-connect
but it does not concatenate or combine the scss files correctly.
Perhaps someone knows how to integrate gulp-php-connect
to make it work?