@@ -36,7 +36,7 @@ gulp.task('build:server', function () {
3636 . pipe ( gulp . dest ( 'dist/server' ) )
3737} ) ;
3838
39- gulp . task ( 'build:client' , function ( ) {
39+ gulp . task ( 'build:client' , function ( ) {
4040 var tsProject = tsc . createProject ( 'client/tsconfig.json' ) ;
4141 var tsResult = gulp . src ( 'client/**/*.ts' )
4242 . pipe ( sourcemaps . init ( ) )
@@ -72,7 +72,7 @@ gulp.task("compile", ["tslint"], () => {
7272 * Copy all resources that are not TypeScript files into build directory. e.g. index.html, css, images
7373 */
7474gulp . task ( "clientResources" , ( ) => {
75- return gulp . src ( [ "client/**/*" , "!**/*.ts" , "!client/typings" , "!client/typings/**" , "!client/*.json" ] )
75+ return gulp . src ( [ "client/**/*" , "!**/*.ts" , "!client/typings" , "!client/typings/**" , "!client/*.json" ] )
7676 . pipe ( gulp . dest ( "dist/client" ) ) ;
7777} ) ;
7878
@@ -89,20 +89,31 @@ gulp.task("serverResources", () => {
8989 */
9090gulp . task ( "libs" , ( ) => {
9191 return gulp . src ( [
92- 'core-js/client/shim.min.js ' ,
92+ 'core-js/client/** ' ,
9393 'zone.js/dist/zone.js' ,
9494 'reflect-metadata/Reflect.js' ,
95+ 'reflect-metadata/Reflect.js.map' ,
9596 'systemjs/dist/system.src.js'
96- ] , { cwd : "node_modules/**" } ) /* Glob required here. */
97+ ] , { cwd : "node_modules/**" } ) /* Glob required here. */
9798 . pipe ( gulp . dest ( "dist/client/libs" ) ) ;
9899} ) ;
99100
101+ /**
102+ * Copy all required libraries into build directory.
103+ */
104+ gulp . task ( "css" , ( ) => {
105+ return gulp . src ( [
106+ 'bootstrap/dist/**/**'
107+ ] , { cwd : "node_modules/**" } ) /* Glob required here. */
108+ . pipe ( gulp . dest ( "dist/client/css" ) ) ;
109+ } ) ;
110+
100111
101112/**
102113 * Install typings for server and client.
103114 */
104- gulp . task ( "installTypings" , function ( ) {
105- var stream = gulp . src ( [ "./server/typings.json" , "./client/typings.json" ] )
115+ gulp . task ( "installTypings" , function ( ) {
116+ var stream = gulp . src ( [ "./server/typings.json" , "./client/typings.json" ] )
106117 . pipe ( gulpTypings ( null ) ) ; //will install all typingsfiles in pipeline.
107118 return stream ; // by returning stream gulp can listen to events from the stream and knows when it is finished.
108119} ) ;
@@ -111,10 +122,12 @@ gulp.task("installTypings",function(){
111122 * Start the express server with nodemon
112123 */
113124gulp . task ( 'start' , function ( ) {
114- nodemon ( { script : 'dist/server/bin/www'
125+ nodemon ( {
126+ script : 'dist/server/bin/www'
115127 , ext : 'html js'
116128 , ignore : [ 'ignored.js' ]
117- , tasks : [ 'tslint' ] } )
129+ , tasks : [ 'tslint' ]
130+ } )
118131 . on ( 'restart' , function ( ) {
119132 console . log ( 'restarted!' )
120133 } ) ;
@@ -130,7 +143,7 @@ gulp.task('start', function () {
130143 */
131144
132145gulp . task ( "build" , function ( callback ) {
133- runSequence ( 'clean' , 'build:server' , 'build:client' , 'clientResources' , 'serverResources' , 'libs' , callback ) ;
146+ runSequence ( 'clean' , 'build:server' , 'build:client' , 'clientResources' , 'serverResources' , 'libs' , 'css ', callback ) ;
134147} ) ;
135148
136149/**
@@ -158,9 +171,9 @@ gulp.task('watch', function () {
158171 */
159172
160173gulp . task ( "build" , function ( callback ) {
161- runSequence ( 'clean' , 'build:server' , 'build:client' , 'clientResources' , 'serverResources' , 'libs' , callback ) ;
174+ runSequence ( 'clean' , 'build:server' , 'build:client' , 'clientResources' , 'serverResources' , 'libs' , 'css ', callback ) ;
162175} ) ;
163176
164- gulp . task ( 'default' , function ( ) {
165- runSequence ( 'build:server' , 'build:client' , 'clientResources' , 'serverResources' , 'libs' , ' watch', 'start' ) ;
177+ gulp . task ( 'default' , function ( ) {
178+ runSequence ( 'build:server' , 'build:client' , 'clientResources' , 'serverResources' , 'libs' , 'css' , ' watch', 'start' ) ;
166179} ) ;
0 commit comments