1313// Documentation on what goes into PolymerProject.
1414const path = require ( 'path' ) ;
1515const gulp = require ( 'gulp' ) ;
16+ const mergeStream = require ( 'merge-stream' ) ;
17+ const del = require ( 'del' ) ;
1618const polymerJsonPath = path . join ( process . cwd ( ) , 'polymer.json' ) ;
1719const polymerJSON = require ( polymerJsonPath ) ;
1820const polymer = require ( 'polymer-build' ) ;
1921const polymerProject = new polymer . PolymerProject ( polymerJSON ) ;
20- const mergeStream = require ( 'merge-stream' ) ;
2122const buildDirectory = 'build/bundled' ;
22- const del = require ( 'del' ) ;
2323
2424/**
2525 * Waits for the given ReadableStream
@@ -42,17 +42,17 @@ function build() {
4242 // Oh, well do you want to minify stuff? Go for it!
4343 // Here's how splitHtml & gulpif work
4444 . pipe ( polymerProject . splitHtml ( ) )
45- // .pipe(gulpif(/\.js$/, new JSOptimizeStream(optimizeOptions.js )))
46- // .pipe(gulpif(/\.css$/, new CSSOptimizeStream(optimizeOptions.css )))
47- // .pipe(gulpif(/\.html$/, new HTMLOptimizeStream(optimizeOptions.html )))
45+ // .pipe(gulpif(/\.js$/, uglify( )))
46+ // .pipe(gulpif(/\.css$/, cssSlam( )))
47+ // .pipe(gulpif(/\.html$/, htmlMinifier( )))
4848 . pipe ( polymerProject . rejoinHtml ( ) ) ;
4949
5050 // Okay now lets do the same to your dependencies
5151 let depsStream = polymerProject . dependencies ( )
5252 . pipe ( polymerProject . splitHtml ( ) )
53- // .pipe(gulpif(/\.js$/, new JSOptimizeStream(optimizeOptions.js )))
54- // .pipe(gulpif(/\.css$/, new CSSOptimizeStream(optimizeOptions.css )))
55- // .pipe(gulpif(/\.html$/, new HTMLOptimizeStream(optimizeOptions.html )))
53+ // .pipe(gulpif(/\.js$/, uglify( )))
54+ // .pipe(gulpif(/\.css$/, cssSlam( )))
55+ // .pipe(gulpif(/\.html$/, htmlMinifier( )))
5656 . pipe ( polymerProject . rejoinHtml ( ) ) ;
5757
5858 // Okay, now lets merge them into a single build stream.
0 commit comments