Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gulp does not regenerate dist files properly #457

Open
toppsdown opened this issue Dec 20, 2016 · 0 comments
Open

Gulp does not regenerate dist files properly #457

toppsdown opened this issue Dec 20, 2016 · 0 comments
Assignees
Labels

Comments

@toppsdown
Copy link

toppsdown commented Dec 20, 2016

Heyo, I just forked this repo to make some custom changes, but when I tried to regenerate the dist files there were two issues

1) There were some unrelated changes mixed in with mine:
a) I checked out current master and ran gulp default but nothing changed
b) I deleted the dist files on master, and ran gulp default, and got the following diff

   EditableController.prototype.insert = function(content, $li) {
-    var data, overrides, range, suffix, suffixNode;
+    var data, range, suffix, suffixNode;
     if (!this.$inputor.is(':focus')) {
       this.$inputor.focus();
     }
-    overrides = this.getOpt("functionOverrides");
-    if (overrides.insert) {
-      return overrides.insert.bind(this)(content, $li);
-    } else {
-      suffix = (suffix = this.getOpt('suffix')) === "" ? suffix : suffix || "\u00A0";
-      data = $li.data('item-data');
-      this.query.el.removeClass('atwho-query').addClass('atwho-inserted').html(content).attr('data-atwho-at-query', "" + data['atwho-at'] + this.query.text).attr('contenteditable', "false");
-      if (range = this._getRange()) {
-        if (this.query.el.length) {
-          range.setEndAfter(this.query.el[0]);
-        }
-        range.collapse(false);
-        range.insertNode(suffixNode = this.app.document.createTextNode("\u200D" + suffix));
-        this._setRange('after', suffixNode, range);
-      }
-      if (!this.$inputor.is(':focus')) {
-        this.$inputor.focus();
+    suffix = (suffix = this.getOpt('suffix')) === "" ? suffix : suffix || "\u00A0";
+    data = $li.data('item-data');
+    this.query.el.removeClass('atwho-query').addClass('atwho-inserted').html(content).attr('data-atwho-at-query', "" + data['atwho-at'] + this.query.text).attr('contenteditable', "false");
+    if (range = this._getRange()) {
+      if (this.query.el.length) {
+        range.setEndAfter(this.query.el[0]);
       }
-      return this.$inputor.change();
+      range.collapse(false);
+      range.insertNode(suffixNode = this.app.document.createTextNode("" + suffix));
+      this._setRange('after', suffixNode, range);
+    }
+    if (!this.$inputor.is(':focus')) {
+      this.$inputor.focus();
     }
+    return this.$inputor.change();
   };

2) Min file does not generate on first attempt
When regenerating the files using gulp default, the min file does not change. You have to run it a second time before the min file is updated

@ichord ichord added the bugs label Mar 15, 2017
@ichord ichord self-assigned this Mar 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants