]> source.dussan.org Git - vaadin-core.git/commitdiff
Temporary fix until webcomponentsjs#180 is fixed
authorManolo Carrasco <manolo@apache.org>
Thu, 8 Oct 2015 06:07:16 +0000 (08:07 +0200)
committerManolo Carrasco <manolo@apache.org>
Thu, 8 Oct 2015 06:07:16 +0000 (08:07 +0200)
tasks/docsite.js

index 4440211f624819d2e303ec54844628d11460fe95..7c99868f67f9ecf74c3b0576e91abbf5ba501dfc 100644 (file)
@@ -28,6 +28,16 @@ gulp.task('cdn:docsite:clean', function() {
 gulp.task('cdn:docsite:bower_components', ['cdn:stage-bower_components'], function() {
   gutil.log('Copying bower components from ' + stagingPath + ' to ' + docPath + '/bower_components');
   return gulp.src([stagingPath + '/**'])
+    // Temporary patch until #180 is fixed:
+    // https://github.com/webcomponents/webcomponentsjs/issues/180
+    .pipe(modify({
+      fileModifier: function(file, contents) {
+        if (/webcomponents-lite.*js/.test(file.path)) {
+          contents = contents.replace(/(if ?\()(\w+\.log)(\))/mg, '$1$2 && $2.split$3')
+        }
+        return contents;
+      }
+    }))
     .pipe(gulp.dest(docPath + '/bower_components'));
 });