wearewondrous / fractal-twig-drupal-adapter

Twig template adapter for Fractal with Drupal 8 directives.
http://fractal.build
MIT License
13 stars 13 forks source link

Difference to twig-fractal? #1

Closed sun closed 7 years ago

sun commented 7 years ago

Hey there,

Can you clarify the difference between this repo and https://github.com/WondrousLLC/twig-drupal which has been marked as deprecated and points to this repo now?

When cloning both and generating a diff, the only functional difference appears to be the following:

diff --git a/twig-drupal/src/adapter.js b/fractal-twig-drupal-adapter/src/adapter.js
index cdfb1e2..0bc443d 100644
--- a/twig-drupal/src/adapter.js
+++ b/fractal-twig-drupal-adapter/src/adapter.js
@@ -184,7 +184,7 @@ class TwigAdapter extends Fractal.Adapter {

         function AttributesObject() {
             let self = this;
-            this.classes = '';
+            this.classes = 'asdasd';
             this.attr = [];

             this.addClass = function(...str) {
@@ -213,7 +213,7 @@ class TwigAdapter extends Fractal.Adapter {

         AttributesObject.prototype.toString = function toString() {
             let attrList = [
-                this.classes !== '' ? `class="${this.classes}"`:'',
+                this.classes ? `class="${this.classes}"`:'',
                 this.attr ? this.attr.join(' ') : '',
             ];

Was the change in the first hunk intended to be committed? It looks like a temporary debugging string?

Did you only intend to change the name of the repository? You can do that by using the very first input field on https://github.com/WondrousLLC/twig-drupal/settings – GitHub will automatically redirect all requests to the old name to the new name.

tassilogroeper commented 7 years ago

Hi sun,

thank you for pointing out this mistake. It obviously is one. Just corrected it.

I was aware of the possibility to rename the repository hat github. The reason I did not do it: we still use the old one in various ways. I was not sure how to do a smooth transition. But point taken ;-)

Thank you again