@@ -179,10 +179,20 @@ function build() {
179179 return merge2 (
180180 gulp . src ( 'src/**/*.json' ) ,
181181 // @if babel
182+ // @if !jasmine && !tape && !mocha
182183 buildJs ( 'src/**/*.js' ) ,
183184 // @endif
185+ // @if jasmine || mocha || tape
186+ buildJs ( isTest ? '{src,test}/**/*.js' : 'src/**/*.js' ) ,
187+ // @endif
188+ // @endif
184189 // @if typescript
185- buildJs ( [ 'src/**/*.d.ts' , 'src/**/*.ts' ] ) ,
190+ // @if !jasmine && !tape && !mocha
191+ buildJs ( 'src/**/*.ts' ) ,
192+ // @endif
193+ // @if jasmine || mocha || tape
194+ buildJs ( isTest ? '{src,test}/**/*.ts' : 'src/**/*.ts' ) ,
195+ // @endif
186196 // @endif
187197 buildHtml ( 'src/**/*.html' ) ,
188198 // @if css
@@ -264,6 +274,7 @@ function watch() {
264274
265275const run = gulp . series ( clean , serve , watch ) ;
266276
277+ // @if jasmine || tape || mocha
267278// Watch all files for rebuild and test.
268279function watchTest ( ) {
269280 return gulp . watch ( '{src,test}/**/*' , gulp . series ( build , test ) ) ;
@@ -273,9 +284,10 @@ function test() {
273284 return gulpRun ( 'npm run test:headless' ) . exec ( ) ;
274285}
275286
287+ exports [ 'watch-test' ] = watchTest ;
288+ // @endif
276289exports . build = build ;
277290exports . clean = clean ;
278291exports [ 'clear-cache' ] = clearCache ;
279292exports . run = run ;
280- exports [ 'watch-test' ] = watchTest ;
281293exports . default = run ;
0 commit comments