-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
49 lines (41 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
41
42
43
44
45
46
47
48
49
var gulp = require('gulp');
var gutil = require('gulp-util');
var mocha = require('gulp-mocha');
var pandoc = require('gulp-pandoc');
var repl = require('repl');
var _ = require('lodash');
gulp.task('default', ['test']);
gulp.task('test', function() {
gulp.src(['test/test.js', 'test/**/*.js'])
.pipe(mocha({ globals: ['chai', 'expect', 'sinon', 'requireFromSrc'] }))
.on('error', gutil.log);
});
gulp.task('docs', function() {
gulp.src('docs/**/*.md')
.pipe(pandoc({
from: 'markdown',
to: 'html5',
ext: '.html',
args: [
'--smart',
'--standalone',
'--table-of-contents',
'--template=./docs/template.html',
'--css=assets/docs.css'
]
}))
.on('error', gutil.log)
.pipe(gulp.dest('public/'));
});
gulp.task('repl', function(done) {
var replServer = repl.start({
prompt: '★ ',
});
var context = {
Effervescent: require('.')
};
_.merge(replServer.context, context);
replServer.on('exit', function() {
done();
});
});