-
Notifications
You must be signed in to change notification settings - Fork 10
/
gulpfile.js
40 lines (38 loc) · 1.02 KB
/
gulpfile.js
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
39
40
var gulp = require('gulp');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var harp = require('harp');
/**
* Serve the Harp Site from the src directory
*/
gulp.task('serve', function () {
harp.server(__dirname, {
port: 9000
}, function () {
browserSync({
proxy: "localhost:9000",
open: false,
/* Hide the notification. It gets annoying */
notify: {
styles: ['opacity: 0', 'position: absolute']
}
});
/**
* Watch for scss changes, tell BrowserSync to refresh main.css
*/
gulp.watch(["*.css", "*.sass", "*.scss", "*.less"], function () {
reload("main.css", {stream: true});
});
/**
* Watch for all other changes, reload the whole page
*/
gulp.watch(["*.html", "*.ejs", "*.jade", "*.js", "*.json", "*.md"], function () {
reload();
});
})
});
/**
* Default task, running `gulp` will fire up the Harp site,
* launch BrowserSync & watch files.
*/
gulp.task('default', ['serve']);