-
Notifications
You must be signed in to change notification settings - Fork 4
/
gulpfile.min.js
1 lines (1 loc) · 1.1 KB
/
gulpfile.min.js
1
const gulp=require("gulp"),sass=require("gulp-sass"),sourcemaps=require("gulp-sourcemaps"),browserSync=require("browser-sync").create(),csso=require("gulp-csso");function html(){return gulp.src(dest+"**/*.html")}function js(){return gulp.src(dest+"**/*.js")}function styles(){return gulp.src(source+"sass/style.scss").pipe(sourcemaps.init()).pipe(sass({sourcemap:!0,style:"compressed"}).on("error",sass.logError)).pipe(csso()).pipe(gulp.dest(dest+"css"))}function watch(){gulp.watch(dest+"js/**/*.js",js).on("change",browserSync.reload),gulp.watch(source+"sass/*.scss",styles).on("change",browserSync.reload),gulp.watch(dest+"*.html",html).on("change",browserSync.reload)}function server(){browserSync.init({notify:!1,server:{baseDir:dest}}),gulp.watch(source+"sass/**/*.scss",styles).on("change",browserSync.reload),gulp.watch(dest+"js/**/*.js",js).on("change",browserSync.reload),gulp.watch(dest+"*.html",html).on("change",browserSync.reload)}source="./process/",dest="./builds/ehealthcare/",sass.compiler=require("node-sass");var build=gulp.series(gulp.parallel(js,styles,html),server,watch);gulp.task("default",build);