plein de truc
This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
||||
'use strict';
|
||||
|
||||
const gulp = require('gulp');
|
||||
const sass = require('gulp-sass')(require('sass'));
|
||||
var browserSync = require('browser-sync').create();
|
||||
|
||||
function buildStyles() {
|
||||
return gulp.src('./scss/vermine2047.scss')
|
||||
.pipe(sass({ outputStyle: 'compressed' }).on('error', sass.logError))
|
||||
.pipe(gulp.dest('./css'))
|
||||
.pipe(browserSync.stream());
|
||||
|
||||
|
||||
};
|
||||
function reloadTemplatesHTML() {
|
||||
|
||||
return browserSync.reload("templates/**/*.html")
|
||||
}
|
||||
|
||||
function reloadTemplatesHBS() {
|
||||
|
||||
return browserSync.reload("templates/**/*.hbs")
|
||||
}
|
||||
exports.buildStyles = buildStyles;
|
||||
exports.watch = function () {
|
||||
browserSync.init(
|
||||
{
|
||||
server: false,
|
||||
proxy: {
|
||||
target: "https://localhost:443/",
|
||||
ws: true,
|
||||
}
|
||||
|
||||
}
|
||||
);
|
||||
gulp.watch("./templates/**/*.html").on('change', reloadTemplatesHTML);
|
||||
gulp.watch("./templates/**/*.hbs").on('change', reloadTemplatesHBS);
|
||||
gulp.watch(['./scss/**/*.scss', './scss/*.scss'], buildStyles);
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user