Skip to content

Commit

Permalink
🐱
Browse files Browse the repository at this point in the history
  • Loading branch information
Keks committed Nov 22, 2024
1 parent a13215d commit 2046990
Show file tree
Hide file tree
Showing 5 changed files with 15,011 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 less from 'gulp-less';
import postcss from 'gulp-postcss';
import autoprefixer from 'autoprefixer';
import browser from 'browser-sync';

// Styles

export const styles = () => {
return gulp.src('source/less/style.less', { sourcemaps: true })
.pipe(plumber())
.pipe(less())
.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/less/**/*.less', gulp.series(styles));
gulp.watch('source/*.html').on('change', browser.reload);
}


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

0 comments on commit 2046990

Please sign in to comment.