Skip to content

Commit

Permalink
exmples: convert oldest apis to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
avevlad committed Apr 24, 2023
1 parent a6ca6b4 commit c1deb38
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions examples/multiple/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var gulp = require('gulp'),
stylus = require('gulp-stylus'),
connect = require('../../index');
var gulp = require('gulp');
var stylus = require('gulp-stylus');
var connect = require('../../index');

gulp.task('connectDev', function () {
connect.server({
Expand All @@ -18,21 +18,21 @@ gulp.task('connectDist', function () {
});
});

gulp.task('html', function () {
gulp.src('./app/*.html')
function htmlTask(cb) {
return gulp.src('./app/*.html')
.pipe(connect.reload());
});
}

gulp.task('stylus', function () {
gulp.src('./app/stylus/*.styl')
function stylusTask(cb) {
return gulp.src('./app/stylus/*.styl')
.pipe(stylus())
.pipe(gulp.dest('./app/css'))
.pipe(connect.reload());
});
}

gulp.task('watch', function () {
gulp.watch(['./app/*.html'], ['html']);
gulp.watch(['./app/stylus/*.styl'], ['stylus']);
gulp.watch(['./app/*.html'], gulp.series(htmlTask));
gulp.watch(['./app/stylus/*.styl'], gulp.series(stylusTask));
});

gulp.task('default', ['connectDist', 'connectDev', 'watch']);

0 comments on commit c1deb38

Please sign in to comment.