forked from danmindru/responsive-html-email-signature
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
43 lines (39 loc) · 835 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
40
41
42
43
'use strict';
var gulp = require('gulp'),
fs = require('fs'),
plumber = require('gulp-plumber');
var options = {
source: 'templates',
dist: 'dist',
workingDir: 'tmp',
src: function plumbedSrc(){
return gulp
.src
.apply(gulp, arguments)
.pipe(plumber());
}
};
/** Load tasks from the '/tasks' directory.
* Look for .js & .coffee files.
* Each file should correspond to a task.
*/
fs
.readdirSync('./tasks')
.filter(function readJSFiles(file) {
return (/\.(js|coffee)$/i).test(file);
})
.map(function loadTasks(file) {
require('./tasks/' + file)(options);
});
/** By default templates will be built into '/dist', then gulp will watch for changes in '/src'. */
gulp.task(
'default',
[
'dupe',
'less',
'sass',
'postcss',
'lint',
'build'
]
);