forked from nestjs/nest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
28 lines (24 loc) · 872 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
const gulp = require('gulp');
const ts = require('gulp-typescript');
const packages = {
common: ts.createProject('src/common/tsconfig.json'),
core: ts.createProject('src/core/tsconfig.json'),
microservices: ts.createProject('src/microservices/tsconfig.json'),
websockets: ts.createProject('src/websockets/tsconfig.json'),
testing: ts.createProject('src/testing/tsconfig.json')
};
const modules = Object.keys(packages);
const source = 'src';
const dist = 'node_modules/@nestjs'
gulp.task('default', function () {
modules.forEach((module) => {
gulp.watch([`${source}/${module}/**/*.ts`, `${source}/${module}/*.ts`], [module]);
});
});
modules.forEach((module) => {
gulp.task(module, () => {
return packages[module].src()
.pipe(packages[module]())
.pipe(gulp.dest(`${dist}/${module}`));
});
});