From 45437de0ba397000f95ef6d94a1316fe27f27bc0 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Tue, 21 Jun 2016 10:36:13 -0700 Subject: [PATCH] Update visualRegression task to use Handlebars instead of DoT templates. - This eliminates the annoying DoT messages from the terminal. --- package.json | 2 +- ...t => visual_regression_gallery.handlebars} | 17 +++--- utilities/visual_regression.js | 53 +++++++++++-------- 3 files changed, 41 insertions(+), 31 deletions(-) rename utilities/templates/{visual_regression_gallery.dot => visual_regression_gallery.handlebars} (92%) diff --git a/package.json b/package.json index b52bb0881bc38..0224faede783a 100644 --- a/package.json +++ b/package.json @@ -161,7 +161,6 @@ "babel-eslint": "4.1.8", "chokidar": "1.4.3", "chromedriver": "2.21.2", - "dot": "1.0.3", "elasticdump": "2.1.1", "eslint": "1.10.3", "eslint-plugin-mocha": "1.1.0", @@ -179,6 +178,7 @@ "grunt-s3": "0.2.0-alpha.3", "grunt-simple-mocha": "0.4.0", "gruntify-eslint": "1.0.1", + "handlebars": "4.0.5", "html-entities": "1.1.3", "husky": "0.8.1", "image-diff": "1.6.0", diff --git a/utilities/templates/visual_regression_gallery.dot b/utilities/templates/visual_regression_gallery.handlebars similarity index 92% rename from utilities/templates/visual_regression_gallery.dot rename to utilities/templates/visual_regression_gallery.handlebars index 176590aa60660..60817dec5fcf2 100644 --- a/utilities/templates/visual_regression_gallery.dot +++ b/utilities/templates/visual_regression_gallery.handlebars @@ -126,13 +126,14 @@
- {{=it.branch}} - {{=it.date}} + {{branch}} - {{date}}
- {{~it.comparisons :comparison:index}} -
+ {{#each comparisons as |comparison|}} +
+
- ({{=comparison.percentage}}%) {{=comparison.name}} + ({{comparison.percentage}}%) {{comparison.name}}
@@ -155,7 +156,7 @@
@@ -166,7 +167,7 @@ >
@@ -174,12 +175,12 @@
- {{~}} + {{/each}}