@@ -28,23 +28,11 @@ var PATHS = {
2828 test : 'test/*.ts' ,
2929 typings : 'src/*.d.ts'
3030 } ,
31- libs : [
32- 'bower_components/bootstrap/dist/css/bootstrap.min.css' ,
33- 'bower_components/bootstrap/dist/css/bootstrap-theme.min.css' ,
34- 'node_modules/angular2/bundles/angular2.js' ,
35- 'node_modules/angular2/bundles/angular2-polyfills.min.js' ,
36- 'node_modules/systemjs/dist/system.js' ,
37- 'node_modules/systemjs/dist/system-polyfills.js' ,
38- 'node_modules/es6-shim/es6-shim.min.js' ,
39- 'node_modules/reflect-metadata/Reflect.js' ,
40- 'node_modules/rxjs/bundles/Rx.min.js'
41- ] ,
42- rx : 'node_modules/rxjs/**/*.js' ,
4331 typings : [
44- 'node_modules/angular2/ typings/**/* .d.ts' ,
32+ 'typings/browser .d.ts' ,
4533 ] ,
4634 testTypings : [
47- 'node_modules/angular2/ typings/**/* .d.ts' ,
35+ 'typings/browser .d.ts' ,
4836 'dist/*.d.ts'
4937 ] ,
5038} ;
@@ -107,15 +95,18 @@ gulp.task('css', function () {
10795 return gulp . src ( PATHS . src . css ) . pipe ( gulp . dest ( 'dist' ) ) ;
10896} ) ;
10997
110- gulp . task ( 'rx' , function ( ) {
111- return gulp . src ( PATHS . rx , { base : 'node_modules/' } ) . pipe ( gulp . dest ( 'dist/' ) ) ;
98+ gulp . task ( 'libs' , function ( ) {
99+ return merge ( [
100+ gulp . src ( 'node_modules/' ) . pipe ( symlink ( 'dist/node_modules' ) ) ,
101+ gulp . src ( 'bower_components/' ) . pipe ( symlink ( 'dist/bower_components' ) )
102+ ] ) ;
112103} ) ;
113104
114- gulp . task ( 'libs ' , [ 'rx' ] , function ( ) {
115- return gulp . src ( PATHS . libs ) . pipe ( gulp . dest ( 'dist/lib' ) ) ;
105+ gulp . task ( 'clean ' , function ( done ) {
106+ return del ( [ 'dist' ] , done ) ;
116107} ) ;
117108
118- gulp . task ( 'build' , function ( ) {
109+ gulp . task ( 'build' , [ 'clean' ] , function ( ) {
119110 return gulp . start ( 'libs' , 'html' , 'css' , 'ts' ) ;
120111} ) ;
121112
0 commit comments