diff --git a/.gitignore b/.gitignore index d01eeb3..2b8391a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,14 @@ .htaccess includes/vendor/* !includes/vendor/.gitkeep + +# environment-specific config user/config.php +# frontend tooling +frontend/node_modules +frontend/package-lock.json + # SQL *.sql *.sql.gz diff --git a/frontend/gulpfile.js b/frontend/gulpfile.js index 9ba2c36..faa1357 100644 --- a/frontend/gulpfile.js +++ b/frontend/gulpfile.js @@ -1,14 +1,20 @@ var gulp = require('gulp'); var sass = require('gulp-sass')(require('sass')); +var browserSync = require('browser-sync').create(); gulp.task('sass', () => { - return gulp.src("./assets/sass/*.scss") + return gulp.src("assets/sass/*.scss") .pipe(sass()) .pipe(gulp.dest("dist/")) + .pipe(browserSync.stream()); }); gulp.task('start', gulp.series('sass', function () { - gulp.watch("sass/*.scss", gulp.series('sass')); + browserSync.init({ + proxy: "utctiny.lndo.site" + }); + gulp.watch("assets/sass/*.scss", gulp.series('sass')); + gulp.watch("*.php").on('change', browserSync.reload); })); gulp.task('default', gulp.series('start')); \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index 71e3138..8760a39 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,6 +10,7 @@ "author": "", "license": "ISC", "devDependencies": { + "browser-sync": "^2.29.3", "gulp": "^4.0.2", "gulp-sass": "^5.0.0", "sass": "^1.35.1"