<iframe src="silence.mp3" allow="autoplay" id="audio" style="display:none"></iframe>
<audio id="player" autoplay loop>
<source src="http://www.mult.ru/rings/night_elf_track.mp3" type="audio/mp3">
</audio>
function gulpSass() {
return gulp
.src('app/sass/**/*.sass')
.pipe(sass({ outputStyle: "expanded" }))
.pipe(autoprefixer(['last 15 versions', '> 1%', 'ie 8', 'ie 7'], {cascade: true})) // Создаю префиксы
.pipe(gulp.dest('app/css'))
.pipe(browsersync.stream())
}
function browserSync(done) {
browsersync.init({
server: {
baseDir: "./"
},
port: 3000,
notify: false
});
done();
}
function watchFiles(done) {
gulp.watch('app/sass/**/*.sass', gulp.parallel(gulpSass));
gulp.watch('app/css/**/*.css', browserSync.reload);
gulp.watch('*.html', browserSync.reload);
gulp.watch('app/js/**/*.js', browserSync.reload);
done();
}
gulp.task('sass', gulpSass);
gulp.task('browser-sync', browserSync);
gulp.task('watch', gulp.parallel(watchFiles, browserSync, sass));