{"action":"created","issue":{"url":"https://api.github.com/repos/drupal-pattern-lab/attach-library-twig-extension/issues/7","repository_url":"https://api.github.com/repos/drupal-pattern-lab/attach-library-twig-extension","labels_url":"https://api.github.com/repos/drupal-pattern-lab/attach-library-twig-extension/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/drupal-pattern-lab/attach-library-twig-extension/issues/7/comments","events_url":"https://api.github.com/repos/drupal-pattern-lab/attach-library-twig-extension/issues/7/events","html_url":"https://github.com/drupal-pattern-lab/attach-library-twig-extension/pull/7","id":370189177,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyOTI1OTg0","number":7,"title":"288: Removes async, adds data attribute","user":{"login":"evanmwillhite","id":18293479,"node_id":"MDQ6VXNlcjE4MjkzNDc5","avatar_url":"https://avatars1.githubusercontent.com/u/18293479?v=4","gravatar_id":"","url":"https://api.github.com/users/evanmwillhite","html_url":"https://github.com/evanmwillhite","followers_url":"https://api.github.com/users/evanmwillhite/followers","following_url":"https://api.github.com/users/evanmwillhite/following{/other_user}","gists_url":"https://api.github.com/users/evanmwillhite/gists{/gist_id}","starred_url":"https://api.github.com/users/evanmwillhite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanmwillhite/subscriptions","organizations_url":"https://api.github.com/users/evanmwillhite/orgs","repos_url":"https://api.github.com/users/evanmwillhite/repos","events_url":"https://api.github.com/users/evanmwillhite/events{/privacy}","received_events_url":"https://api.github.com/users/evanmwillhite/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-15T14:26:00Z","updated_at":"2018-10-23T09:31:08Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/drupal-pattern-lab/attach-library-twig-extension/pulls/7","html_url":"https://github.com/drupal-pattern-lab/attach-library-twig-extension/pull/7","diff_url":"https://github.com/drupal-pattern-lab/attach-library-twig-extension/pull/7.diff","patch_url":"https://github.com/drupal-pattern-lab/attach-library-twig-extension/pull/7.patch"},"body":"Companion to https://github.com/fourkitchens/emulsify/pull/288, this removes the troublesome async attribute and replaces it with a data attribute that is detected in JS by a new script in the companion PR."},"comment":{"url":"https://api.github.com/repos/drupal-pattern-lab/attach-library-twig-extension/issues/comments/432171785","html_url":"https://github.com/drupal-pattern-lab/attach-library-twig-extension/pull/7#issuecomment-432171785","issue_url":"https://api.github.com/repos/drupal-pattern-lab/attach-library-twig-extension/issues/7","id":432171785,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjE3MTc4NQ==","user":{"login":"philwolstenholme","id":6339853,"node_id":"MDQ6VXNlcjYzMzk4NTM=","avatar_url":"https://avatars1.githubusercontent.com/u/6339853?v=4","gravatar_id":"","url":"https://api.github.com/users/philwolstenholme","html_url":"https://github.com/philwolstenholme","followers_url":"https://api.github.com/users/philwolstenholme/followers","following_url":"https://api.github.com/users/philwolstenholme/following{/other_user}","gists_url":"https://api.github.com/users/philwolstenholme/gists{/gist_id}","starred_url":"https://api.github.com/users/philwolstenholme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philwolstenholme/subscriptions","organizations_url":"https://api.github.com/users/philwolstenholme/orgs","repos_url":"https://api.github.com/users/philwolstenholme/repos","events_url":"https://api.github.com/users/philwolstenholme/events{/privacy}","received_events_url":"https://api.github.com/users/philwolstenholme/received_events","type":"User","site_admin":false},"created_at":"2018-10-23T09:31:08Z","updated_at":"2018-10-23T09:31:08Z","author_association":"COLLABORATOR","body":"@evanmwillhite I've given this a try, but I'm getting errors in my console to do with missing jQuery, because my component library scripts are trying to run before my global library (which contains jQuery) is being loaded in the footer (this is done before `<script src=\"../../js/reload-scripts.js\"></script>` is mentioned, so I think this setup _should_ be okay.\r\n\r\nI think we could prevent this by doing some more data-attribute trickery, for example, instead of using\r\n\r\n```<script data-name=\"reload\" src=\"/path-to-file.min.js></script>``` \r\n\r\nWe could use:\r\n\r\n```<script data-name=\"reload\" data-src=\"/path-to-file.min.js></script>``` \r\n\r\nAnd then use the JS in Emulsify to swap the data-src for an actual src. This way, the libraries won't actually be loaded until `reload-scripts` has a chance to run."}}
{"actor":{"display_login":"philwolstenholme"}}