Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.

Commit 17be882

Browse files
Fix .ts files being copied to the build dir (#325)
Before this change, running `gulp` would incorrectly copy `.ts` test files to the `build/test` directory.
1 parent b58b2f7 commit 17be882

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gulpfile.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ const tslintPath = path.join(__dirname, 'tslint.json');
3434
const outDir = 'build';
3535
const sources = ['src/**/*.ts'];
3636
const unitTests = ['test/**/*.ts'];
37+
const unitTestsSupportFiles = ['test/**/*', '!test/**/*.ts'];
3738
const systemTests = ['system-test/**/*.ts'];
39+
const systemTestsSupportFiles = ['system-test/**/*', '!system-test/**/*.ts'];
3840
const allFiles = sources.concat(unitTests).concat(systemTests);
3941

4042
let exitOnError = true;
@@ -88,7 +90,7 @@ gulp.task('compile', () => {
8890
});
8991

9092
gulp.task('test.system.copy', () => {
91-
return gulp.src(['system-test/**/*'])
93+
return gulp.src(systemTestsSupportFiles)
9294
.pipe(gulp.dest(`${outDir}/system-test`));
9395
});
9496

@@ -112,7 +114,7 @@ gulp.task('test.packagejson.copy', () => {
112114
});
113115

114116
gulp.task('test.unit.copy', () => {
115-
return gulp.src(['test/**/*'])
117+
return gulp.src(unitTestsSupportFiles)
116118
.pipe(gulp.dest(`${outDir}/test`));
117119
});
118120

0 commit comments

Comments
 (0)