forked from gajus/gitdown
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
35 lines (28 loc) · 827 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
var gulp = require('gulp'),
mocha = require('gulp-mocha'),
eslint = require('gulp-eslint'),
Gitdown = require('./src/');
gulp.task('lint', function () {
return gulp
.src(['./src/**/*.js', './tests/**/*.js'])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failOnError());
});
gulp.task('test', ['lint'], function () {
return gulp
.src(['./tests/**/*.js'], {
read: false
})
.pipe(mocha());
});
gulp.task('gitdown', function () {
var gitdown;
gitdown = Gitdown.readFile('./.README/README.md');
return gitdown.writeFile('./README.md');
});
gulp.task('watch', function () {
gulp.watch(['./src/**/*', './tests/**/*'], ['default']);
gulp.watch(['./.README/**/*'], ['gitdown']);
});
gulp.task('default', ['test']);