Skip to content

Commit

Permalink
🐱
Browse files Browse the repository at this point in the history
  • Loading branch information
Keks committed Dec 17, 2024
1 parent 2eff39e commit eba9190
Show file tree
Hide file tree
Showing 5 changed files with 14,789 additions and 3,288 deletions.
45 changes: 45 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import gulp from 'gulp';
import plumber from 'gulp-plumber';
import sass from 'gulp-dart-sass';
import postcss from 'gulp-postcss';
import autoprefixer from 'autoprefixer';
import browser from 'browser-sync';

// Styles

export const styles = () => {
return gulp.src('source/sass/style.scss', { sourcemaps: true })
.pipe(plumber())
.pipe(sass().on('error', sass.logError))
.pipe(postcss([
autoprefixer()
]))
.pipe(gulp.dest('source/css', { sourcemaps: '.' }))
.pipe(browser.stream());
}

// Server

const server = (done) => {
browser.init({
server: {
baseDir: 'source'
},
cors: true,
notify: false,
ui: false,
});
done();
}

// Watcher

const watcher = () => {
gulp.watch('source/sass/**/*.scss', gulp.series(styles));
gulp.watch('source/*.html').on('change', browser.reload);
}


export default gulp.series(
styles, server, watcher
);
Loading

0 comments on commit eba9190

Please sign in to comment.