forked from Programacion2UNET/programacion2unet.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
38 lines (32 loc) · 881 Bytes
/
gulpfile.js
File metadata and controls
38 lines (32 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var gulp = require('gulp');
var sass = require('gulp-sass');
var livereload = require('gulp-livereload');
var connect = require('gulp-connect');
gulp.task('default', ['connect','watch']);
gulp.task('connect', function() {
connect.server({
port: 8080,
livereload: true
});
});
gulp.task('html', function () {
gulp.src('index.html')
.pipe(connect.reload());
});
gulp.task('jshint', function() {
return gulp.src('source/javascript/**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'));
});
gulp.task('sass', function () {
return gulp.src('./css/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./css'))
.pipe(livereload());
});
gulp.task('watch', function() {
livereload.listen();
gulp.watch('./js/*.js', ['jshint']);
gulp.watch('./css/*.scss', ['sass']);
gulp.watch(['index.html'], ['html']);
});