@@ -57,7 +57,7 @@ gulp.task('patch-lib', function() {
5757} ) ;
5858
5959gulp . task ( 'clean' , function ( ) {
60- return del ( [ BUILD + '**' , BUILD_DOCS + '**' , DIST + '**' ] ) ;
60+ return del ( [ BUILD + '**' , BUILD_DOCS + '**' ] ) ;
6161} ) ;
6262
6363gulp . task ( 'copy' , function ( ) {
@@ -95,25 +95,22 @@ gulp.task('font', function() {
9595
9696gulp . task ( 'vulcanize' , function ( ) {
9797 var modules = gulp . src ( BUILD + "mm-*/mm-*.html" )
98- . pipe ( changed ( BUILD ) )
98+ . pipe ( debug ( ) )
9999 . pipe ( vulcanize ( {
100- inlineScripts :true ,
101- inlineCss :true ,
102- stripExcludes :true ,
103- excludes : {
104- imports : [ '.*polymer\.html' ]
105- }
100+ inlineScripts : true ,
101+ inlineCss : true ,
102+ excludes : [ 'bower_components/polymer/polymer.html' ]
106103 } ) )
104+ . pipe ( debug ( ) )
107105 . pipe ( htmlmin ( ) )
108106 . pipe ( gulp . dest ( BUILD ) ) ;
107+
109108 var lib = gulp . src ( BUILD + "strand.html" )
110109 . pipe ( vulcanize ( {
111110 inlineScripts :true ,
112111 inlineCss :true ,
113112 stripExcludes :false ,
114- // excludes: {
115- // imports: ['.*\.html','polymer.html']
116- // }
113+ excludes : [ 'bower_components/polymer/polymer.html' ]
117114 } ) )
118115 . pipe ( gulp . dest ( BUILD ) ) ;
119116 return merge ( modules , lib ) ;
@@ -127,8 +124,28 @@ gulp.task('build', function(cb) {
127124 run ( 'copy' , [ 'sass' , 'font' ] , 'vulcanize' , cb ) ;
128125} ) ;
129126
127+ gulp . task ( 'build:modules' , function ( ) {
128+ var modules = gulp . src ( BUILD + 'strand.html' )
129+ . pipe ( vulcanize ( {
130+ inlineScripts :true ,
131+ inlineCss :true ,
132+ stripExcludes :false
133+ } ) )
134+ . pipe ( base64 ( [ '.woff' ] ) )
135+ . pipe ( htmlmin ( {
136+ quotes : true ,
137+ empty : true ,
138+ spare : true
139+ } ) )
140+ . pipe ( inlinemin ( ) )
141+ . pipe ( header ( '<!--\n' + fs . readFileSync ( 'BANNER.txt' ) . toString ( 'utf8' ) + ' -->' ) )
142+ . pipe ( changed ( DIST ) )
143+ . pipe ( gulp . dest ( DIST ) ) ;
144+ return modules ;
145+ } ) ;
146+
130147gulp . task ( 'build:prod' , [ 'patch-lib' , 'build' ] , function ( ) {
131- return gulp . src ( BUILD + 'strand.html' )
148+ var lib = gulp . src ( BUILD + 'strand.html' )
132149 . pipe ( vulcanize ( {
133150 inlineScripts :true ,
134151 inlineCss :true ,
0 commit comments