@@ -119,7 +119,7 @@ gulp.task('compile:component', ['clean:component'], function(cb) {
119
119
runSequence ( [ 'scripts' , 'styles' , 'partials' ] , cb ) ;
120
120
} ) ;
121
121
122
- gulp . task ( 'build: component' , [ 'compile:component' ] , function ( ) {
122
+ gulp . task ( 'build. component.minified ' , [ 'compile:component' ] , function ( ) {
123
123
var jsFilter = $ . filter ( '**/*.js' , { restore : true } ) ;
124
124
var cssFilter = $ . filter ( '**/*.css' , { restore : true } ) ;
125
125
@@ -129,14 +129,35 @@ gulp.task('build:component', ['compile:component'], function() {
129
129
path . join ( conf . paths . tmp , 'partials/templateCacheHtml.js' )
130
130
] )
131
131
. pipe ( jsFilter )
132
- . pipe ( concat ( { path : 'angularjs-dropdown-multiselect.min.js' } ) )
133
- . pipe ( $ . sourcemaps . init ( ) )
134
- . pipe ( $ . uglify ( { preserveComments : $ . uglifySaveLicense } ) ) . on ( 'error' , conf . errorHandler ( 'Uglify' ) )
135
- . pipe ( $ . sourcemaps . write ( 'maps' ) )
132
+ . pipe ( concat ( { path : 'angularjs-dropdown-multiselect.min.js' } ) )
133
+ . pipe ( $ . sourcemaps . init ( ) )
134
+ . pipe ( $ . uglify ( { preserveComments : $ . uglifySaveLicense } ) ) . on ( 'error' , conf . errorHandler ( 'Uglify' ) )
135
+ . pipe ( $ . sourcemaps . write ( 'maps' ) )
136
136
. pipe ( jsFilter . restore )
137
137
. pipe ( cssFilter )
138
138
. pipe ( $ . cssnano ( ) )
139
139
. pipe ( cssFilter . restore )
140
140
. pipe ( gulp . dest ( path . join ( conf . paths . dist , '/' ) ) )
141
- . pipe ( $ . size ( { title : path . join ( conf . paths . dist , '/' ) , showFiles : true } ) ) ;
141
+ . pipe ( $ . size ( { title : path . join ( conf . paths . dist , '/' ) , showFiles : true } ) ) ;
142
+ } ) ;
143
+
144
+ gulp . task ( 'build.component' , [ 'compile:component' ] , function ( ) {
145
+ var jsFilter = $ . filter ( '**/*.js' , { restore : true } ) ;
146
+ var cssFilter = $ . filter ( '**/*.css' , { restore : true } ) ;
147
+
148
+ return gulp . src ( [
149
+ path . join ( conf . paths . tmp , 'serve/app/index.css' ) ,
150
+ path . join ( conf . paths . tmp , 'serve/app/index.module.js' ) ,
151
+ path . join ( conf . paths . tmp , 'partials/templateCacheHtml.js' )
152
+ ] )
153
+ . pipe ( jsFilter )
154
+ . pipe ( concat ( { path : 'angularjs-dropdown-multiselect.js' } ) )
155
+ . pipe ( jsFilter . restore )
156
+ . pipe ( cssFilter )
157
+ . pipe ( $ . cssnano ( ) )
158
+ . pipe ( cssFilter . restore )
159
+ . pipe ( gulp . dest ( path . join ( conf . paths . dist , '/src' ) ) )
160
+ . pipe ( $ . size ( { title : path . join ( conf . paths . dist , '/' ) , showFiles : true } ) ) ;
142
161
} ) ;
162
+
163
+ gulp . task ( 'build:component' , [ 'build.component.minified' , 'build.component' ] ) ;
0 commit comments