@@ -34,7 +34,6 @@ var inlinemin = require('gulp-minify-inline');
3434var wrap = require ( 'gulp-wrap' ) ;
3535var inlineAssets = require ( 'gulp-inline-assets' ) ;
3636var marked = require ( 'gulp-marked' ) ;
37- var changed = require ( 'gulp-changed' ) ;
3837var cache = require ( 'gulp-cached' ) ;
3938var postcss = require ( 'gulp-postcss' ) ;
4039var git = require ( 'gulp-git' ) ;
@@ -80,15 +79,15 @@ gulp.task('clean:dist', function() {
8079
8180gulp . task ( 'copy' , function ( ) {
8281 return gulp . src ( [ j ( SRC , '**/*.+(html|js|woff)' ) , j ( '!' , SRC , '**/example.html' ) ] )
83- . pipe ( changed ( BUILD ) )
82+ . pipe ( cache ( 'copy' ) )
8483 . pipe ( debug ( ) )
8584 . pipe ( gulp . dest ( BUILD ) ) ;
8685} ) ;
8786
8887gulp . task ( 'sass' , function ( ) {
8988 var wrapper = fs . readFileSync ( j ( TEMPLATES , "style_module_template.html" ) , 'utf8' ) ;
9089 return gulp . src ( SRC + 'mm-*/*.scss' )
91- . pipe ( changed ( BUILD , { extension : '.css' } ) )
90+ . pipe ( cache ( 'scss' ) )
9291 . pipe ( sass ( { includePaths : [ './bower_components/bourbon/app/assets/stylesheets/' , './src/shared/sass/' ] } ) . on ( 'error' , sass . logError ) )
9392 . pipe ( postcss ( [ autoprefixer ( { browsers : [ 'last 2 versions' ] } ) ] ) )
9493 . pipe ( gulp . dest ( BUILD ) )
@@ -146,7 +145,7 @@ gulp.task('vulcanize', function() {
146145 excludes . push ( 'bower_components/polymer/polymer.html' ) ;
147146
148147 var modules = gulp . src ( moduleGlob )
149- // .pipe(changed(BUILD ))
148+ . pipe ( cache ( 'v-modules' ) )
150149 . pipe ( vulcanizeSingle ( {
151150 inlineScripts : true ,
152151 inlineCss : true ,
@@ -191,7 +190,6 @@ gulp.task('build:prod', ['patch-lib', 'build'], function() {
191190 } ) )
192191 . pipe ( inlinemin ( ) )
193192 . pipe ( header ( '<!--\n' + fs . readFileSync ( 'BANNER.txt' , 'utf8' ) + ' -->' ) )
194- . pipe ( changed ( DIST ) )
195193 . pipe ( gulp . dest ( DIST ) ) ;
196194
197195 var lib = gulp . src ( j ( BUILD , 'strand.html' ) )
@@ -208,7 +206,6 @@ gulp.task('build:prod', ['patch-lib', 'build'], function() {
208206 } ) )
209207 . pipe ( inlinemin ( ) )
210208 . pipe ( header ( '<!--\n' + fs . readFileSync ( 'BANNER.txt' , 'utf8' ) + ' -->' ) )
211- . pipe ( changed ( DIST ) )
212209 . pipe ( gulp . dest ( DIST ) ) ;
213210
214211 return merge ( modules , lib ) ;
@@ -402,7 +399,7 @@ gulp.task('docs:templates', function() {
402399 } ) ;
403400
404401 var indexStream = gulp . src ( './docs/index.html' )
405- . pipe ( changed ( BUILD_DOCS ) )
402+ . pipe ( cache ( 'docs_dex' ) )
406403 . pipe ( through . obj ( function ( file , enc , cb ) {
407404 // TODO: Put this in a closure
408405 var templateString = file . contents . toString ( 'utf8' ) ;
@@ -415,7 +412,7 @@ gulp.task('docs:templates', function() {
415412 . pipe ( gulp . dest ( BUILD_DOCS ) ) ;
416413
417414 var moduleStream = gulp . src ( j ( SRC , 'mm-*/doc.json' ) )
418- . pipe ( changed ( BUILD_DOCS ) )
415+ . pipe ( cache ( 'docs_module' ) )
419416 . pipe ( injectBehaviorDocs ( behaviorsMap ) )
420417 . pipe ( injectModuleData ( pkg , moduleMap , articleList , articleMap ) )
421418 // .pipe(debug())
@@ -438,7 +435,7 @@ gulp.task('docs:templates', function() {
438435 . on ( 'error' , console . log ) ;
439436
440437 var articleStream = gulp . src ( './docs/articles/*.md' )
441- . pipe ( changed ( BUILD_DOCS ) )
438+ . pipe ( cache ( 'docs_article' ) )
442439 . pipe ( marked ( ) . on ( 'error' , console . log ) )
443440 . pipe ( injectArticleData ( pkg , moduleMap , articleList , articleMap ) )
444441 . pipe ( rename ( { prefix : 'article_' } ) )
0 commit comments