-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
68 lines (54 loc) · 1.51 KB
/
gulpfile.js
File metadata and controls
68 lines (54 loc) · 1.51 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
var gulp = require('gulp');
var harp = require('harp');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var includeSources = require('gulp-include-source');
var deploy = require('gulp-gh-pages');
var shell = require('gulp-shell');
gulp.task('html', function() {
return gulp.src( './_harp/_indexTemplate/index.html' )
.pipe(includeSources())
.pipe(gulp.dest('./_harp'))
.pipe(browserSync.stream());
});
gulp.task('harp', ['html'], function () {
return gulp.src('')
.pipe(shell([
'harp compile _harp dist'
]))
.pipe(browserSync.stream());
});
gulp.task('watch', function() {
gulp.watch('./_harp/javascript/**/*', ['harp']);
gulp.watch('./_harp/**/*.html', ['harp']);
gulp.watch('./_harp/sass/**/*.scss', ['harp']);
});
// mostly taken from http://charliegleason.com/articles/harp-gulp-and-browsersync
/**
* Serve the Harp Site
*/
gulp.task('serve', function () {
harp.server('./dist', {
port: 9000
}, function () {
browserSync({
proxy: "localhost:9000",
open: false,
/* Hide the notification. It gets annoying */
notify: {
styles: ['opacity: 0', 'position: absolute']
}
});
gulp.watch('./_harp/javascript/**/*', ['harp']);
gulp.watch('./_harp/**/*.html', ['harp']);
gulp.watch('./_harp/sass/**/*.scss', ['harp']);
});
});
/**
* Push build to gh-pages
*/
gulp.task('deploy', ['html', 'harp'], function () {
return gulp.src("./dist/**/*")
.pipe(deploy());
});
gulp.task('default', ['harp']);