-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgulpfile.js
39 lines (30 loc) · 964 Bytes
/
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
'use strict';
require('coffee-script/register');
var gulp = require('gulp');
var assemble = require('gulp-assemble');
var clean = require('gulp-clean');
var jshint = require('gulp-jshint');
// var mocha = require('gulp-mocha');
var options = require('./extensions/config');
gulp.task('assemble', function () {
gulp.src('templates/pages/*.hbs')
.pipe(assemble(options))
.pipe(gulp.dest('_gh_pages/'));
gulp.src('content/posts/**/*.md')
.pipe(assemble(options))
.pipe(gulp.dest('_gh_pages/blog/'));
});
gulp.task('lint', function () {
gulp.src(['extensions/*.js', 'test/*.js', '*.js'])
.pipe(jshint('.jshintrc'))
.pipe(jshint.reporter('default'));
});
gulp.task('clean', function () {
gulp.src(['_gh_pages/**/*.html'], {read: false})
.pipe(clean());
});
// gulp.task('test', function () {
// gulp.src(['test/test.js'])
// .pipe(mocha({reporter: 'spec'}));
// });
gulp.task('default', ['assemble', 'clean', 'lint']);