Arc-hive-omeka-theme/_off/gulpfile.js

38 lines
953 B
JavaScript
Raw Normal View History

2021-04-25 09:49:47 +02:00
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var $ = require('gulp-load-plugins')();
var autoprefixer = require('autoprefixer');
var sassPaths = [
'node_modules/foundation-sites/scss',
'node_modules/motion-ui/src'
];
function sass() {
return gulp.src('asset/scss/*.scss')
.pipe($.sass({
includePaths: sassPaths,
outputStyle: 'compressed' // if css compressed **file size**
})
.on('error', $.sass.logError))
.pipe($.postcss([
autoprefixer()
]))
.pipe(gulp.dest('asset/css'))
.pipe(browserSync.stream());
};
function serve() {
browserSync.init({
server: "./"
});
gulp.watch("asset/scss/*.scss", sass);
gulp.watch("asset/scss/*/*.scss", sass);
2021-04-25 09:49:47 +02:00
gulp.watch("*.html").on('change', browserSync.reload);
}
gulp.task('sass', sass);
gulp.task('serve', gulp.series('sass', serve));
gulp.task('default', gulp.series('sass', serve));