Skip to content

Commit ad64cc8

Browse files
Dan LaskyShuwen Qian
authored andcommitted
remove changed in favor of cached
1 parent f909404 commit ad64cc8

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

Gulpfile.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ var inlinemin = require('gulp-minify-inline');
3434
var wrap = require('gulp-wrap');
3535
var inlineAssets = require('gulp-inline-assets');
3636
var marked = require('gulp-marked');
37-
var changed = require('gulp-changed');
3837
var cache = require('gulp-cached');
3938
var postcss = require('gulp-postcss');
4039
var git = require('gulp-git');
@@ -80,15 +79,15 @@ gulp.task('clean:dist', function() {
8079

8180
gulp.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

8887
gulp.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_'}))

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"gulp-base64": "^0.1.3",
2424
"gulp-bump": "^1.0.0",
2525
"gulp-cached": "^1.1.0",
26-
"gulp-changed": "^1.3.0",
2726
"gulp-conventional-changelog": "^1.0.1",
2827
"gulp-debug": "^2.1.2",
2928
"gulp-gh-pages": "^0.5.4",

0 commit comments

Comments
 (0)