From bab6e27152c0b38527943d346eaca5ed8ef4da43 Mon Sep 17 00:00:00 2001 From: Kognise Date: Sun, 7 Apr 2019 22:00:52 -0400 Subject: [PATCH] Tiny stylistic changes --- gulpfile.js | 77 ++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index af6775a..99039d6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,52 +1,51 @@ -var gulp = require('gulp'), - sass = require('gulp-sass'), - postcss = require('gulp-postcss'), - autoprefixer = require("autoprefixer"), - cssnano = require("cssnano"), - sourcemaps = require("gulp-sourcemaps"), - browserSync = require("browser-sync").create(); +const gulp = require('gulp') +const sass = require('gulp-sass') +const postcss = require('gulp-postcss') +const autoprefixer = require('autoprefixer') +const cssnano = require('cssnano') +const sourcemaps = require('gulp-sourcemaps') +const browserSync = require('browser-sync').create() -var paths = { - styles: { - src: "src/**/*.scss", - dest: "dist" - }, - html: { - src: "index.html" - } +const paths = { + styles: { + src: 'src/**/*.scss', + dest: 'dist' + }, + html: { + src: 'index.html' + } } function style() { - return( - gulp.src(paths.styles.src) - .pipe(sourcemaps.init()) - .pipe(sass()) - .on("error", sass.logError) - .pipe(postcss([autoprefixer(), cssnano()])) - .pipe(sourcemaps.write('.')) - .pipe(gulp.dest(paths.styles.dest)) - .pipe(browserSync.stream()) - ); + return ( + gulp.src(paths.styles.src) + .pipe(sourcemaps.init()) + .pipe(sass()) + .on('error', sass.logError) + .pipe(postcss([autoprefixer(), cssnano()])) + .pipe(sourcemaps.write('.')) + .pipe(gulp.dest(paths.styles.dest)) + .pipe(browserSync.stream()) + ) } -exports.style = style; - -function reload(){ - browserSync.reload(); +function reload() { + browserSync.reload() } function watch() { - style(); + style() - browserSync.init({ - server: { - baseDir: "./", - }, - startPath: "index.html" - }) + browserSync.init({ + server: { + baseDir: './', + }, + startPath: 'index.html' + }) - gulp.watch(paths.styles.src, style); - gulp.watch(paths.html.src, reload) + gulp.watch(paths.styles.src, style) + gulp.watch(paths.html.src, reload) } -exports.watch = watch; \ No newline at end of file +module.exports.style = style +module.exports.watch = watch \ No newline at end of file