forked from ngOfficeUIFabric/ng-officeuifabric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.ts
36 lines (33 loc) · 1014 Bytes
/
gulpfile.ts
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
import * as fs from 'fs';
import { BuildConfig } from './build/config/build';
let gulp: any = require('gulp-help')(require('gulp'));
/**
* yargs variables can be passed in to alter the behavior, when present.
* Example: gulp serve-dev
*
* --verbose : Various tasks will produce more output to the console.
*/
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// load all gulp tasks (located in ./build/gulp/tasks)
fs.readdirSync(BuildConfig.GULP_TASKS)
.filter((filename: any) => {
return filename.match(/\.js$/i);
})
.map((filename: string) => {
return <IGulpTaskFile>{
GulpTask: require(BuildConfig.GULP_TASKS + '/' + filename).GulpTask,
name: filename.substr(0, filename.length - 3)
};
})
.forEach((file: IGulpTaskFile) => {
gulp.task(
file.name,
file.GulpTask.description,
file.GulpTask.dependencies,
file.GulpTask,
{
aliases: file.GulpTask.aliases,
options: file.GulpTask.options
}
);
});