-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
41 lines (26 loc) · 1.08 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
'use strict';
var log = require('gulp-util').log;
var gulp = require('gulp');
var wrench = require('wrench');
var _ = require('lodash');
var typescript = require('gulp-typescript');
gulp.task('dts', function () {
var ts = gulp.src('./ts/*.ts')
.pipe(typescript({declarationFiles: true}));
return ts.dts.pipe(gulp.dest('./interfaces'));
});
module.exports = function (projectDir, projectConfig) {
/* jshint camelcase:false */
var apToolsDir = __dirname + '/';
/** Get default paths based on current directory */
var defaultConfig = require('./gulp.config')(apToolsDir, projectDir, projectConfig);
/** Allow overrides to be passed in */
var paths = _.assign({}, defaultConfig, projectConfig);
/** Iterate over each of the gulp modules so we can break logic up into smaller chunks */
wrench.readdirSyncRecursive(defaultConfig.gulpFolder).filter(function (file) {
return (/\.(js|coffee)$/i).test(file);
}).map(function (file) {
require(defaultConfig.gulpFolder + '/' + file)(projectDir, paths);
});
////////////////
};