@@ -12,15 +12,17 @@ var header = require('gulp-header'),
1212 rimraf = require ( 'rimraf' ) ,
1313 merge = require ( 'merge2' ) ,
1414 karma = require ( 'karma' ) ,
15- webpack = require ( 'webpack-stream' ) ,
15+ webpack = require ( 'webpack' ) ;
16+ webpackStream = require ( 'webpack-stream' ) ,
1617 webpackConfig = require ( './webpack.config' ) ,
1718 webpackTestConfig = require ( './webpack.test.config' ) ,
1819 runSequence = require ( 'run-sequence' ) ,
1920 argv = require ( 'yargs' ) . argv ;
2021 ;
2122
2223var package = require ( './package.json' ) ;
23- var banner = "/*! <%= package.name %> v<%= package.version %> | (c) 2016 Microsoft Corporation <%= package.license %> */\n" ;
24+ var webpackBanner = package . name + " v" + package . version + " | (c) 2016 Microsoft Corporation " + package . license ;
25+ var gulpBanner = "/*! " + webpackBanner + " */\n" ;
2426
2527gulp . task ( 'watch' , 'Watches for changes' , [ 'lint' ] , function ( ) {
2628 gulp . watch ( [ './src/**/*.ts' , './test/**/*.ts' ] , [ 'lint:ts' ] ) ;
@@ -55,7 +57,7 @@ gulp.task('build', 'Runs a full build', function (done) {
5557
5658gulp . task ( 'header' , 'Add header to distributed files' , function ( ) {
5759 return gulp . src ( [ './dist/*.d.ts' ] )
58- . pipe ( header ( banner , { package : package } ) )
60+ . pipe ( header ( gulpBanner ) )
5961 . pipe ( gulp . dest ( './dist' ) ) ;
6062} ) ;
6163
@@ -81,8 +83,12 @@ gulp.task('min:js', 'Creates minified JavaScript file', function() {
8183} ) ;
8284
8385gulp . task ( 'compile:ts' , 'Compile typescript for powerbi library' , function ( ) {
86+ webpackConfig . plugins = [
87+ new webpack . BannerPlugin ( webpackBanner )
88+ ] ;
89+
8490 return gulp . src ( [ './src/powerbi.ts' ] )
85- . pipe ( webpack ( webpackConfig ) )
91+ . pipe ( webpackStream ( webpackConfig ) )
8692 . pipe ( gulp . dest ( 'dist/' ) ) ;
8793} ) ;
8894
@@ -103,7 +109,7 @@ gulp.task('compile:dts', 'Generate dts files from modules', function () {
103109
104110gulp . task ( 'compile:spec' , 'Compile spec tests' , function ( ) {
105111 return gulp . src ( [ './test/test.spec.ts' ] )
106- . pipe ( webpack ( webpackTestConfig ) )
112+ . pipe ( webpackStream ( webpackTestConfig ) )
107113 . pipe ( gulp . dest ( './tmp' ) ) ;
108114} ) ;
109115
0 commit comments