forked from introprogramming/introprogramming.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
29 lines (23 loc) · 644 Bytes
/
gulpfile.js
File metadata and controls
29 lines (23 loc) · 644 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
var gulp = require('gulp'),
sass = require('gulp-sass'),
watch = require('gulp-watch'),
server = require('connect'),
gutil = require('gulp-util')
gulp.task('styles', function() {
gulp.src('*.scss')
.pipe(sass())
.pipe(gulp.dest('./'))
})
gulp.task('serve', ['watch'], function() {
var port = 3000
server.createServer(server.static(__dirname)).listen(port)
gutil.log("Test server listening on localhost:"+port+" ...");
gutil.log("Press Ctrl+C to quit");
})
gulp.task('watch', function() {
gulp.src('*.scss')
.pipe(watch())
.pipe(sass())
.on('error', gutil.log)
.pipe(gulp.dest('./'))
})