Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gulp-connect has fallen out-of-date and has dependencies with security vulnerabilities.
- Loading branch information
Showing
4 changed files
with
1,798 additions
and
764 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
var bourbon = require("bourbon").includePaths, | ||
connect = require("gulp-connect"), | ||
gulp = require("gulp"), | ||
sass = require("gulp-sass"); | ||
const bourbon = require('bourbon').includePaths; | ||
const browserSync = require('browser-sync').create(); | ||
const gulp = require('gulp'); | ||
const sass = require('gulp-sass'); | ||
|
||
var paths = { | ||
const paths = { | ||
scss: [ | ||
"./core/**/*.scss", | ||
"./contrib/*.scss" | ||
'./core/**/*.scss', | ||
'./contrib/*.scss', | ||
] | ||
}; | ||
|
||
gulp.task("sass", function () { | ||
gulp.task('serve', ['sass'], function() { | ||
browserSync.init({ | ||
open: false, | ||
server: './contrib', | ||
}); | ||
|
||
gulp.watch(paths.scss, ['sass']); | ||
gulp.watch('contrib/*.html').on('change', browserSync.reload); | ||
}); | ||
|
||
gulp.task('sass', function() { | ||
return gulp.src(paths.scss) | ||
.pipe(sass({ | ||
includePaths: ["styles"].concat(bourbon) | ||
includePaths: ['styles'].concat(bourbon), | ||
})) | ||
.pipe(gulp.dest("./contrib")) | ||
.pipe(connect.reload()); | ||
.pipe(gulp.dest('./contrib')) | ||
.pipe(browserSync.stream()); | ||
}); | ||
|
||
gulp.task("connect", function() { | ||
connect.server({ | ||
root: "contrib", | ||
port: 8000, | ||
livereload: true | ||
}); | ||
}); | ||
|
||
gulp.task("default", ["sass", "connect"], function() { | ||
gulp.watch(paths.scss, ["sass"]); | ||
}); | ||
gulp.task('default', ['serve']); |
Oops, something went wrong.