@@ -245,9 +245,8 @@ function injectTsConfig(filesGlob, tsconfigPath){
245
245
gulp.task('inject:tsconfig', () => {
246
246
return injectTsConfig ( [
247
247
`${ clientPath } /**/!(*.spec|*.mock).ts` ,
248
- `!${ clientPath } /bower_components/**/*` ,
249
- `${ clientPath } /typings/**/*.d.ts` ,
250
- `!${ clientPath } /test_typings/**/*.d.ts`
248
+ `!${ clientPath } /bower_components/**/*` ,
249
+ `typings/main.d.ts`
251
250
] ,
252
251
'./tsconfig.client.json' ) ;
253
252
} );
@@ -256,8 +255,7 @@ gulp.task('inject:tsconfigTest', () => {
256
255
return injectTsConfig ( [
257
256
`${ clientPath } /**/+(*.spec|*.mock).ts` ,
258
257
`!${ clientPath } /bower_components/**/*` ,
259
- `!${ clientPath } /typings/**/*.d.ts` ,
260
- `${ clientPath } /test_typings/**/*.d.ts`
258
+ `typings/main.d.ts`
261
259
] ,
262
260
'./tsconfig.client.test.json' ) ;
263
261
} );< % } % >
@@ -298,25 +296,17 @@ gulp.task('inject:<%= styleExt %>', () => {
298
296
} ) ; < % } % > < % if ( filters . ts ) { % >
299
297
300
298
// Install DefinitelyTyped TypeScript definition files
301
- gulp . task ( 'tsd' , cb => {
302
- plugins . tsd ( {
303
- command : 'reinstall' ,
304
- config : './tsd.json'
305
- } , cb ) ;
306
- } ) ;
307
-
308
- gulp . task ( 'tsd:test' , cb => {
309
- plugins . tsd ( {
310
- command : 'reinstall' ,
311
- config : './tsd_test.json'
312
- } , cb ) ;
299
+ gulp . task ( 'typings' , ( ) => {
300
+ return gulp . src ( "./typings.json" )
301
+ . pipe ( plugins . typings ( ) ) ;
313
302
} ) ; < % } % >
314
303
315
304
gulp . task ( 'styles' , ( ) => {
316
305
< % _ if ( ! filters . css ) { _ % >
317
306
return gulp . src ( paths . client . mainStyle )
318
307
< % _ } else { _ % >
319
- return gulp . src ( paths . client . styles ) < % } % >
308
+ return gulp . src ( paths . client . styles )
309
+ < % _ } _ % >
320
310
. pipe ( styles ( ) )
321
311
. pipe ( gulp . dest ( '.tmp/app' ) ) ;
322
312
} ) ; < % if ( filters . ts ) { % >
@@ -326,20 +316,18 @@ gulp.task('copy:constant', ['constant'], () => {
326
316
. pipe ( gulp . dest ( '.tmp/app' ) ) ;
327
317
} )
328
318
329
- gulp . task ( 'transpile:client' , [ 'tsd' , 'copy:constant' ] , ( ) => {
330
- let tsProject = plugins . typescript . createProject ( './tsconfig.client.json' ) ;
331
- return tsProject . src ( )
319
+ gulp . task ( 'transpile:client' , [ 'typings' , 'copy:constant' ] , ( ) => {
320
+ return gulp . src ( [ 'client/{app,components}/**/!(*.spec|*.mock).ts' , 'typings/main.d.ts' ] )
332
321
. pipe ( plugins . sourcemaps . init ( ) )
333
- . pipe ( plugins . typescript ( tsProject ) ) . js
322
+ . pipe ( plugins . typescript ( ) ) . js
334
323
. pipe ( plugins . sourcemaps . write ( '.' ) )
335
324
. pipe ( gulp . dest ( '.tmp' ) ) ;
336
325
} ) ;
337
326
338
- gulp . task ( 'transpile:client:test' , [ 'tsd:test' ] , ( ) => {
339
- let tsTestProject = plugins . typescript . createProject ( './tsconfig.client.test.json' ) ;
340
- return tsTestProject . src ( )
327
+ gulp . task ( 'transpile:client:test' , [ 'typings' ] , ( ) => {
328
+ return gulp . src ( [ 'client/{app,components}/**/+(*.spec|*.mock).ts' , 'typings/main.d.ts' ] )
341
329
. pipe ( plugins . sourcemaps . init ( ) )
342
- . pipe ( plugins . typescript ( tsTestProject ) ) . js
330
+ . pipe ( plugins . typescript ( ) ) . js
343
331
. pipe ( plugins . sourcemaps . write ( '.' ) )
344
332
. pipe ( gulp . dest ( '.tmp/test' ) ) ;
345
333
} ) ; < % } % > < % if ( filters . babel ) { % >
@@ -448,7 +436,7 @@ gulp.task('watch', () => {
448
436
. pipe ( gulp . dest ( '.tmp' ) )
449
437
. pipe ( plugins . livereload ( ) ) ; < % } % > < % if ( filters . ts ) { % >
450
438
451
- gulp . watch ( paths . client . scripts , [ 'inject:tsconfig' , ' lint:scripts:client', 'transpile:client' ] ) ; < % } % >
439
+ gulp . watch ( paths . client . scripts , [ 'lint:scripts:client' , 'transpile:client' ] ) ; < % } % >
452
440
453
441
plugins . watch ( _ . union ( paths . server . scripts , testFiles ) )
454
442
. pipe ( plugins . plumber ( ) )
@@ -459,7 +447,7 @@ gulp.task('watch', () => {
459
447
} ) ;
460
448
461
449
gulp . task ( 'serve' , cb => {
462
- runSequence ( [ 'clean:tmp' , 'constant' , 'env:all' < % if ( filters . ts ) { % > , 'tsd ' < % } % > ] ,
450
+ runSequence ( [ 'clean:tmp' , 'constant' , 'env:all' < % if ( filters . ts ) { % > , 'typings ' < % } % > ] ,
463
451
[ 'lint:scripts' , 'inject' < % if ( filters . jade ) { % > , 'jade' < % } % > ] ,
464
452
[ 'wiredep:client' ] ,
465
453
[ 'transpile:client' , 'styles' ] ,
@@ -478,7 +466,7 @@ gulp.task('serve:dist', cb => {
478
466
} ) ;
479
467
480
468
gulp . task ( 'serve:debug' , cb => {
481
- runSequence ( [ 'clean:tmp' , 'constant' < % if ( filters . ts ) { % > , 'tsd ' < % } % > ] ,
469
+ runSequence ( [ 'clean:tmp' , 'constant' < % if ( filters . ts ) { % > , 'typings ' < % } % > ] ,
482
470
[ 'lint:scripts' , 'inject' < % if ( filters . jade ) { % > , 'jade' < % } % > ] ,
483
471
[ 'wiredep:client' ] ,
484
472
[ 'transpile:client' , 'styles' ] ,
@@ -568,7 +556,7 @@ gulp.task('build', cb => {
568
556
'jade' , < % } % >
569
557
'inject',
570
558
'wiredep:client',< % if ( filters . ts ) { % >
571
- 'tsd ',< % } % >
559
+ 'typings ',< % } % >
572
560
[
573
561
'build:images',
574
562
'copy:extras',
0 commit comments