{"action":"created","issue":{"url":"https://api.github.com/repos/JeremyEnglert/JointsWP/issues/96","labels_url":"https://api.github.com/repos/JeremyEnglert/JointsWP/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/JeremyEnglert/JointsWP/issues/96/comments","events_url":"https://api.github.com/repos/JeremyEnglert/JointsWP/issues/96/events","html_url":"https://github.com/JeremyEnglert/JointsWP/issues/96","id":97656216,"number":96,"title":"Adding custom JavaScript files for global and specific pages - best practices ","user":{"login":"konsulenten","id":10710013,"avatar_url":"https://avatars.githubusercontent.com/u/10710013?v=3","gravatar_id":"","url":"https://api.github.com/users/konsulenten","html_url":"https://github.com/konsulenten","followers_url":"https://api.github.com/users/konsulenten/followers","following_url":"https://api.github.com/users/konsulenten/following{/other_user}","gists_url":"https://api.github.com/users/konsulenten/gists{/gist_id}","starred_url":"https://api.github.com/users/konsulenten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/konsulenten/subscriptions","organizations_url":"https://api.github.com/users/konsulenten/orgs","repos_url":"https://api.github.com/users/konsulenten/repos","events_url":"https://api.github.com/users/konsulenten/events{/privacy}","received_events_url":"https://api.github.com/users/konsulenten/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-28T09:28:58Z","updated_at":"2015-07-30T17:49:38Z","closed_at":null,"body":"I have a few custom JavaScript-files that is to be added in the project. Some built by myself and some libraries that could be called from Bower.\r\n\r\nI've added Instafeed.js to Bower-components and want to add that to some of the pages and post types in the site. To make it work, I added it in a custom footer.php.\r\n\r\nI will also use probably use some libraries on all pages (maybe Isotope or similar). \r\nSome of these depend on JQuery and I noticed that they have to be loaded after JointsWP JQuery in order to work.\r\n\r\nWhat are the best practices to solve this?\r\nWe probably want these files minified with the rest through Gulp etc?\r\n\r\n\r\nBest regards,\r\nReidar Nygård\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/JeremyEnglert/JointsWP/issues/comments/126415874","html_url":"https://github.com/JeremyEnglert/JointsWP/issues/96#issuecomment-126415874","issue_url":"https://api.github.com/repos/JeremyEnglert/JointsWP/issues/96","id":126415874,"user":{"login":"JeremyEnglert","id":6110968,"avatar_url":"https://avatars.githubusercontent.com/u/6110968?v=3","gravatar_id":"","url":"https://api.github.com/users/JeremyEnglert","html_url":"https://github.com/JeremyEnglert","followers_url":"https://api.github.com/users/JeremyEnglert/followers","following_url":"https://api.github.com/users/JeremyEnglert/following{/other_user}","gists_url":"https://api.github.com/users/JeremyEnglert/gists{/gist_id}","starred_url":"https://api.github.com/users/JeremyEnglert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeremyEnglert/subscriptions","organizations_url":"https://api.github.com/users/JeremyEnglert/orgs","repos_url":"https://api.github.com/users/JeremyEnglert/repos","events_url":"https://api.github.com/users/JeremyEnglert/events{/privacy}","received_events_url":"https://api.github.com/users/JeremyEnglert/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T17:49:38Z","updated_at":"2015-07-30T17:49:38Z","body":"Hi @konsulenten, I think part of the confusion stems from using Gulp and CodeKit - they are very similar tools. You really only need to use one.\r\n\r\n**Compiling JS**\r\nBy default, the version of the theme you are using enqueues the JS file from 'assets/js/min/scripts.min.js' - if you wanted to, you could add your custom JS directly to that file. Then you wouldn't have to worry about compiling at all.\r\n\r\n**Removing Unused JS/CSS from Foundation**\r\nYour method will definitely work (and is how many people do it). However, if you decide to use Gulp instead of CodeKit, it's even easier. Simply remove the JS files you aren't using from the gulpfile.js. (The gulpfile.js tells Gulp which JS files to grab from Bower). \r\n\r\nPS - It does look like some changes have been made in JointsWP compared to the version you are using. However, nothing major."}}