-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
50 lines (39 loc) · 1.15 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
50
var gulp = require('gulp');
var format = 'png';
var sources = ['index.js'];
var testSources = ['test/**/*.js'];
var allSources = sources.concat(testSources);
var buildPath = 'test/build';
gulp.task('jshint', function() {
var jshint = require('gulp-jshint');
var jshintStylish = require('jshint-stylish');
gulp.src(allSources)
.pipe(jshint())
.pipe(jshint.reporter(jshintStylish));
});
gulp.task('jscs', function () {
var jscs = require('gulp-jscs');
gulp.src(allSources)
.pipe(jscs());
});
gulp.task('clean', function () {
var clean = require('gulp-clean');
return gulp.src(buildPath + '/*.png', {read: false})
.pipe(clean());
});
gulp.task('test1', ['clean'], function () {
var math = require('./'),
rename = require("gulp-rename");
gulp.src('test/**/*.tex')
.pipe(math({
format: format,
dpi: 300
}))
.pipe(rename({extname: '.' + format}))
.pipe(gulp.dest(buildPath));
});
gulp.task( 'default', [ 'clean', 'jshint', 'jscs', 'watch' ] );
// Gulp Watch
gulp.task( 'watch', function(){
gulp.watch( allSources, ['default'] );
});